Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
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
Uh oh!
There was an error while loading. Please reload this page.
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
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,17 @@ | ||
| repos: | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.0.288 | ||
| hooks: | ||
| - id: ruff | ||
| name: Run Ruff on Lib/test/ | ||
| args: [--exit-non-zero-on-fix] | ||
AlexWaygood marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page.
hugovk marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
| files: ^Lib/test/ | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v4.4.0 | ||
| hooks: | ||
| - id: check-toml | ||
| exclude: ^Lib/test/test_tomllib/ | ||
| - id: check-yaml | ||
| - id: end-of-file-fixer | ||
| types: [python] | ||
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 resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
| ] | ||
| 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.