]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Lint: Create a project-wide ``.ruff.toml`` settings file (#133124)
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>
Thu, 1 May 2025 08:28:44 +0000 (09:28 +0100)
committerGitHub <noreply@github.com>
Thu, 1 May 2025 08:28:44 +0000 (08:28 +0000)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
.ruff.toml [new file with mode: 0644]
Doc/.ruff.toml
Lib/test/.ruff.toml
Tools/build/.ruff.toml
Tools/clinic/.ruff.toml

diff --git a/.ruff.toml b/.ruff.toml
new file mode 100644 (file)
index 0000000..1c015fa
--- /dev/null
@@ -0,0 +1,12 @@
+# Default settings for Ruff in CPython
+
+# PYTHON_FOR_REGEN
+target-version = "py310"
+
+# PEP 8
+line-length = 79
+
+# Enable automatic fixes by default.
+# To override this, use ``fix = false`` in a subdirectory's config file
+# or ``--no-fix`` on the command line.
+fix = true
index 111ce03b91df3896bfb10f76907eb83025f7f5b7..3e676e13c3f41ac6f9d13d7b272e528921553693 100644 (file)
@@ -1,7 +1,6 @@
+extend = "../.ruff.toml"  # Inherit the project-wide settings
+
 target-version = "py312"  # Align with the version in oldest_supported_sphinx
-fix = true
-output-format = "full"
-line-length = 79
 extend-exclude = [
     "includes/*",
     # Temporary exclusions:
index 54126bf32619ab724728d43bc25f833296f17838..a1eac32a83aae37c7282b3fab1fa8fe24a3e5909 100644 (file)
@@ -1,4 +1,5 @@
-fix = true
+extend = "../../.ruff.toml"  # Inherit the project-wide settings
+
 extend-exclude = [
     # Excluded (run with the other AC files in its own separate ruff job in pre-commit)
     "test_clinic.py",
index e4f024333adf1abc11461ec4692a2428d7627c21..c084c06144adaf050f45f83f3c3c557f0bd1c97a 100644 (file)
@@ -1,6 +1,4 @@
-target-version = "py310"
-fix = true
-line-length = 79
+extend = "../../.ruff.toml"  # Inherit the project-wide settings
 
 [lint]
 select = [
index c019572d0cb1864bf1b249f92972676976f0ce05..5033887df0c1cdaa86fc8a7cf1492213bf020949 100644 (file)
@@ -1,5 +1,4 @@
-target-version = "py310"
-fix = true
+extend = "../../.ruff.toml"  # Inherit the project-wide settings
 
 [lint]
 select = [