Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[2213] Add support for single line format skip with other comments on…
… the same line (#3959)
- Loading branch information
1 parent
1d4c31a
commit 878937b
Showing
6 changed files
with
81 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
tests/data/cases/preview_single_line_format_skip_with_multiple_comments.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# flags: --preview | ||
foo = 123 # fmt: skip # noqa: E501 # pylint | ||
bar = ( | ||
123 , | ||
( 1 + 5 ) # pylint # fmt:skip | ||
) | ||
baz = "a" + "b" # pylint; fmt: skip; noqa: E501 | ||
skip_will_not_work = "a" + "b" # pylint fmt:skip | ||
skip_will_not_work2 = "a" + "b" # some text; fmt:skip happens to be part of it | ||
|
||
# output | ||
|
||
foo = 123 # fmt: skip # noqa: E501 # pylint | ||
bar = ( | ||
123 , | ||
( 1 + 5 ) # pylint # fmt:skip | ||
) | ||
baz = "a" + "b" # pylint; fmt: skip; noqa: E501 | ||
skip_will_not_work = "a" + "b" # pylint fmt:skip | ||
skip_will_not_work2 = "a" + "b" # some text; fmt:skip happens to be part of it |