Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
gh-110558: Run ruff on Argument Clinic in CI
  • Loading branch information
AlexWaygood committed Oct 9, 2023
commit dec89bc79b53547888db5668cf19ac33a383ab92
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ repos:
name: Run Ruff on Lib/test/
args: [--exit-non-zero-on-fix]
files: ^Lib/test/
- id: ruff
name: Run Ruff on Tools/clinic/
args: [--exit-non-zero-on-fix]
files: ^Tools/clinic/

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand Down
14 changes: 14 additions & 0 deletions Tools/clinic/.ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
target-version = "py310"
fix = true
select = [
"F", # Enable all pyflakes rules
"RUF100", # Ban unused `# noqa` comments
"PGH004", # Ban blanket `# noqa` comments (only ignore specific error codes)
]
unfixable = [
# The autofixes sometimes do the wrong things for these;
# it's better to have to manually look at the code and see how it needs fixing
"F841",
"F601",
"F602",
]