-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-too-many-positional
- Loading branch information
Showing
64 changed files
with
3,096 additions
and
1,278 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,3 +43,6 @@ def f(): | |
''' # noqa | ||
|
||
regex = '\\\_' | ||
|
||
#: W605:1:7 | ||
u'foo\ bar' |
42 changes: 28 additions & 14 deletions
42
crates/ruff_linter/resources/test/fixtures/pycodestyle/W605_1.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 |
---|---|---|
@@ -1,40 +1,54 @@ | ||
# Same as `W605_0.py` but using f-strings instead. | ||
|
||
#: W605:1:10 | ||
regex = '\.png$' | ||
regex = f'\.png$' | ||
|
||
#: W605:2:1 | ||
regex = ''' | ||
regex = f''' | ||
\.png$ | ||
''' | ||
|
||
#: W605:2:6 | ||
f( | ||
'\_' | ||
f'\_' | ||
) | ||
|
||
#: W605:4:6 | ||
""" | ||
f""" | ||
multi-line | ||
literal | ||
with \_ somewhere | ||
in the middle | ||
""" | ||
|
||
#: W605:1:38 | ||
value = f'new line\nand invalid escape \_ here' | ||
|
||
def f(): | ||
#: W605:1:11 | ||
return'\.png$' | ||
|
||
#: Okay | ||
regex = r'\.png$' | ||
regex = '\\.png$' | ||
regex = r''' | ||
regex = fr'\.png$' | ||
regex = f'\\.png$' | ||
regex = fr''' | ||
\.png$ | ||
''' | ||
regex = r''' | ||
regex = fr''' | ||
\\.png$ | ||
''' | ||
s = '\\' | ||
regex = '\w' # noqa | ||
regex = ''' | ||
s = f'\\' | ||
regex = f'\w' # noqa | ||
regex = f''' | ||
\w | ||
''' # noqa | ||
|
||
regex = f'\\\_' | ||
value = f'\{{1}}' | ||
value = f'\{1}' | ||
value = f'{1:\}' | ||
value = f"{f"\{1}"}" | ||
value = rf"{f"\{1}"}" | ||
|
||
# Okay | ||
value = rf'\{{1}}' | ||
value = rf'\{1}' | ||
value = rf'{1:\}' | ||
value = f"{rf"\{1}"}" |
54 changes: 0 additions & 54 deletions
54
crates/ruff_linter/resources/test/fixtures/pycodestyle/W605_2.py
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
crates/ruff_linter/resources/test/fixtures/pydocstyle/D208.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 |
---|---|---|
@@ -1,5 +1,16 @@ | ||
""" | ||
Author | ||
""" | ||
|
||
|
||
class Platform: | ||
""" Remove sampler | ||
Args: | ||
Returns: | ||
""" | ||
|
||
|
||
def memory_test(): | ||
""" | ||
参数含义:precision:精确到小数点后几位 | ||
""" |
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
Oops, something went wrong.