File tree Expand file tree Collapse file tree 5 files changed +21
-3
lines changed Expand file tree Collapse file tree 5 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ permissions:
77
88env :
99 FORCE_COLOR : 1
10- RUFF_FORMAT : github
10+ RUFF_OUTPUT_FORMAT : github
1111
1212concurrency :
1313 group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Original file line number Diff line number Diff line change 66 name : Run Ruff on Lib/test/
77 args : [--exit-non-zero-on-fix]
88 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
913
1014 - repo : https://github.com/pre-commit/pre-commit-hooks
1115 rev : v4.4.0
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ select = [
33 " F811" , # Redefinition of unused variable (useful for finding test methods with the same name)
44]
55extend-exclude = [
6+ # Excluded (run with the other AC files in its own separate ruff job in pre-commit)
7+ " test_clinic.py" ,
68 # Failed to lint
79 " badsyntax_pep3120.py" ,
810 " encoded_modules/module_iso_8859_1.py" ,
Original file line number Diff line number Diff line change 44
55from test import support , test_tools
66from test .support import os_helper
7- from test .support import SHORT_TIMEOUT , requires_subprocess
87from test .support .os_helper import TESTFN , unlink
98from textwrap import dedent
109from unittest import TestCase
@@ -600,7 +599,6 @@ def test_param_no_docstring(self):
600599 follow_symlinks: bool = True
601600 something_else: str = ''
602601 """ )
603- p = function .parameters ['follow_symlinks' ]
604602 self .assertEqual (3 , len (function .parameters ))
605603 conv = function .parameters ['something_else' ].converter
606604 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