File tree 5 files changed +21
-4
lines changed
Filter options
5 files changed +21
-4
lines changed
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ permissions:
7
7
8
8
env :
9
9
FORCE_COLOR : 1
10
- RUFF_FORMAT : github
10
+ RUFF_OUTPUT_FORMAT : github
11
11
12
12
concurrency :
13
13
group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Original file line number Diff line number Diff line change 6
6
name : Run Ruff on Lib/test/
7
7
args : [--exit-non-zero-on-fix]
8
8
files : ^Lib/test/
9
+ - id : ruff
10
+ name : Run Ruff on Tools/clinic/
11
+ args : [--exit-non-zero-on-fix, --config=Tools/clinic/.ruff.toml]
12
+ files : ^Tools/clinic/|Lib/test/test_clinic.py
9
13
10
14
- repo : https://github.com/pre-commit/pre-commit-hooks
11
15
rev : v4.4.0
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ select = [
3
3
" F811" , # Redefinition of unused variable (useful for finding test methods with the same name)
4
4
]
5
5
extend-exclude = [
6
+ # Excluded (run with the other AC files in its own separate ruff job in pre-commit)
7
+ " test_clinic.py" ,
6
8
# Excluded (these aren't actually executed, they're just "data files")
7
9
" tokenizedata/*.py" ,
8
10
# Failed to lint
Original file line number Diff line number Diff line change
1
+ target-version = " py310"
2
+ fix = true
3
+ select = [
4
+ " F" , # Enable all pyflakes rules
5
+ " RUF100" , # Ban unused `# noqa` comments
6
+ " PGH004" , # Ban blanket `# noqa` comments (only ignore specific error codes)
7
+ ]
8
+ unfixable = [
9
+ # The autofixes sometimes do the wrong things for these;
10
+ # it's better to have to manually look at the code and see how it needs fixing
11
+ " F841" , # Detects unused variables
12
+ " F601" , # Detects dictionaries that have duplicate keys
13
+ " F602" , # Also detects dictionaries that have duplicate keys
14
+ ]
Original file line number Diff line number Diff line change @@ -924,7 +924,6 @@ def compiler_deprecated_warning(
924
924
925
925
# Format the preprocessor warning and error messages.
926
926
assert isinstance (self .cpp .filename , str )
927
- source = os .path .basename (self .cpp .filename )
928
927
message = f"Update the clinic input of { func .full_name !r} ."
929
928
code = self .COMPILER_DEPRECATION_WARNING_PROTOTYPE .format (
930
929
major = minversion [0 ],
@@ -1846,7 +1845,6 @@ def render_function(
1846
1845
last_group = 0
1847
1846
first_optional = len (selfless )
1848
1847
positional = selfless and selfless [- 1 ].is_positional_only ()
1849
- new_or_init = f .kind .new_or_init
1850
1848
has_option_groups = False
1851
1849
1852
1850
# offset i by -1 because first_optional needs to ignore self
@@ -6343,7 +6341,6 @@ def check_remaining_star(self, lineno: int | None = None) -> None:
6343
6341
else :
6344
6342
return
6345
6343
6346
- no_param_after_symbol = True
6347
6344
for p in reversed (self .function .parameters .values ()):
6348
6345
if self .keyword_only :
6349
6346
if p .kind == inspect .Parameter .KEYWORD_ONLY :
You can’t perform that action at this time.
0 commit comments