summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorAlex Waygood <Alex.Waygood@Gmail.com>2023-10-10 08:58:56 (GMT)
committerGitHub <noreply@github.com>2023-10-10 08:58:56 (GMT)
commit36886726a2fe9a2c8511cfb405704f39cf184d7c (patch)
tree0c358a797fe0d462dc5c746c7f3c211287e09f0d /Tools
parent0ffbde4e05a32eb16bd61bfd6a7158a5b0bd785f (diff)
downloadcpython-36886726a2fe9a2c8511cfb405704f39cf184d7c.zip
cpython-36886726a2fe9a2c8511cfb405704f39cf184d7c.tar.gz
cpython-36886726a2fe9a2c8511cfb405704f39cf184d7c.tar.bz2
[3.12] gh-110558: Run ruff on Argument Clinic in CI (#110559) (#110598)
Diffstat (limited to 'Tools')
-rw-r--r--Tools/clinic/.ruff.toml14
1 files changed, 14 insertions, 0 deletions
diff --git a/Tools/clinic/.ruff.toml b/Tools/clinic/.ruff.toml
new file mode 100644
index 0000000..3bc9d90
--- /dev/null
+++ b/Tools/clinic/.ruff.toml
@@ -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", # Detects unused variables
+ "F601", # Detects dictionaries that have duplicate keys
+ "F602", # Also detects dictionaries that have duplicate keys
+]