File tree 5 files changed +21
-3
lines changed
5 files changed +21
-3
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
# Failed to lint
7
9
" badsyntax_pep3120.py" ,
8
10
" encoded_modules/module_iso_8859_1.py" ,
Original file line number Diff line number Diff line change 4
4
5
5
from test import support , test_tools
6
6
from test .support import os_helper
7
- from test .support import SHORT_TIMEOUT , requires_subprocess
8
7
from test .support .os_helper import TESTFN , unlink
9
8
from textwrap import dedent
10
9
from unittest import TestCase
@@ -600,7 +599,6 @@ def test_param_no_docstring(self):
600
599
follow_symlinks: bool = True
601
600
something_else: str = ''
602
601
""" )
603
- p = function .parameters ['follow_symlinks' ]
604
602
self .assertEqual (3 , len (function .parameters ))
605
603
conv = function .parameters ['something_else' ].converter
606
604
self .assertIsInstance (conv , clinic .str_converter )
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
+ ]
You can’t perform that action at this time.
0 commit comments