Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.287
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]
files: ^Lib/test/

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand Down
38 changes: 38 additions & 0 deletions Lib/test/.ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
fix = true
select = [
"F811", # Redefinition of unused variable (useful for finding test methods with the same name)
]
extend-exclude = [
# Failed to lint
"badsyntax_pep3120.py",
"encoded_modules/module_iso_8859_1.py",
"encoded_modules/module_koi8_r.py",
# Failed to parse
"mod_generics_cache.py",
"badsyntax_3131.py",
"support/socket_helper.py",
"test_builtin.py",
"test_fstring.py",
"test_funcattrs.py",
"test_functools.py",
"test_type_aliases.py",
"test_type_params.py",
"test_typing.py",
# TODO Fix: F811 Redefinition of unused name
"test__opcode.py",
"test_buffer.py",
"test_ctypes/test_arrays.py",
"test_ctypes/test_functions.py",
"test_dataclasses/__init__.py",
"test_descr.py",
"test_enum.py",
"test_genericclass.py",
"test_grammar.py",
"test_import/__init__.py",
"test_keywordonlyarg.py",
"test_pkg.py",
"test_subclassinit.py",
"test_unittest/testmock/testpatch.py",
"test_yield_from.py",
"time_hashlib.py",
]