-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-60283: Check for redefined test names in CI #109161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4cd4803
Check for redefined names in CI
hugovk a37828c
Temporarily exclude files with: F811 Redefinition of unused name
hugovk 0dcdd08
Move Ruff config file to relevant subdirectory to localise rules
hugovk d14c002
Comment the rule
hugovk cb8237c
Move autofix setting from pre-commit to Ruff config
hugovk 1bdae72
Show diff and add annotations
hugovk 83904af
Re-order args
hugovk 8fd293a
Remove --diff
hugovk 66e1172
Update config
hugovk 9b1b43a
Don't validate intentionally invalid TOML
hugovk 3839aea
Let tomllib look after its own test files
hugovk 0bf3e3e
Clarify job scope
hugovk 932f2c1
Add colour to test logs for readability
hugovk 0889959
Bump Ruff
hugovk 6ba396d
Remove some exclusions which now parse
hugovk d9dff8d
Temporarily exclude test_monitoring.py pending fix
hugovk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
fix = true | ||
select = [ | ||
"F811", # Redefinition of unused variable (useful for finding test methods with the same name) | ||
AlexWaygood marked this conversation as resolved.
Show resolved
Hide resolved
|
||
] | ||
extend-exclude = [ | ||
# Failed to lint | ||
"badsyntax_pep3120.py", | ||
"encoded_modules/module_iso_8859_1.py", | ||
"encoded_modules/module_koi8_r.py", | ||
# Failed to parse | ||
"badsyntax_3131.py", | ||
"support/socket_helper.py", | ||
"test_fstring.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_functools.py", | ||
"test_genericclass.py", | ||
"test_grammar.py", | ||
"test_import/__init__.py", | ||
"test_keywordonlyarg.py", | ||
"test_pkg.py", | ||
"test_subclassinit.py", | ||
"test_typing.py", | ||
"test_unittest/testmock/testpatch.py", | ||
"test_yield_from.py", | ||
"time_hashlib.py", | ||
# Pending https://github.com/python/cpython/pull/109139 | ||
"test_monitoring.py", | ||
] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.