mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 22:31:47 +00:00
Fix incorect placement of trailing stub function comments (#11632)
This commit is contained in:
parent
889667ad84
commit
9b6d2ce1f2
6 changed files with 142 additions and 44 deletions
|
@ -240,7 +240,8 @@ impl FormatRule<Suite, PyFormatContext<'_>> for FormatSuite {
|
|||
preceding_stub.end(),
|
||||
f.context().source(),
|
||||
) < 2
|
||||
});
|
||||
})
|
||||
&& !preceding_comments.has_trailing_own_line();
|
||||
|
||||
if !is_preceding_stub_function_without_empty_line {
|
||||
match self.kind {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue