diff options
author | Thaddeus Crews <repiteo@outlook.com> | 2024-05-31 17:05:43 (GMT) |
---|---|---|
committer | Thaddeus Crews <repiteo@outlook.com> | 2024-06-02 15:29:53 (GMT) |
commit | 112118151dc8e555f06e573380523dbc78a14a1b (patch) | |
tree | 78782c07c41be96eab9f163b3cff9376d5640b56 | |
parent | 432ec8acf264e428acc7c823692561472555c9a3 (diff) | |
download | SCons-112118151dc8e555f06e573380523dbc78a14a1b.zip SCons-112118151dc8e555f06e573380523dbc78a14a1b.tar.gz SCons-112118151dc8e555f06e573380523dbc78a14a1b.tar.bz2 |
Replace `black`/`flake8` with `ruff`
-rw-r--r-- | .flake8 | 22 | ||||
-rw-r--r-- | CHANGES.txt | 1 | ||||
-rw-r--r-- | RELEASE.txt | 3 | ||||
-rw-r--r-- | pyproject.toml | 31 |
4 files changed, 29 insertions, 28 deletions
diff --git a/.flake8 b/.flake8 deleted file mode 100644 index d10d72d..0000000 --- a/.flake8 +++ /dev/null @@ -1,22 +0,0 @@ -[flake8] -show-source = True -# don't complain about work black has done -max-line-length = 88 -extend-exclude = - bin, - bench, - doc, - src, - template, - testing, - test, - timings, - SCons/Tool/docbook/docbook-xsl-1.76.1, - bootstrap.py, - runtest.py -extend-ignore = - E302, - E305 -per-file-ignores = - # module symbols made available for compat - ignore "unused" warns - SCons/Util/__init__.py: F401 diff --git a/CHANGES.txt b/CHANGES.txt index 4dff9da..889a7ae 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER access SCons internals. - Migrate setup.cfg logic to pyproject.toml; remove setup.cfg. - Update .gitattributes to match .editorconfig; enforce eol settings. + - Replace black/flake8 with ruff for more efficient formatting & linting. From Raymond Li: - Fix issue #3935: OSErrors are now no longer hidden during execution of diff --git a/RELEASE.txt b/RELEASE.txt index fd269d6..5d5c2eb 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -92,6 +92,9 @@ DEVELOPMENT The repo-wide line-ending is now `lf`, with the exception of a few Windows-only files using `crlf` instead. Any files not already fitting this format have been explicitly converted. +- Repository linter/formatter changed from flake8/black to ruff, as the + latter grants an insane speed boost without compromising functionality. + Existing settings were migrated 1-to-1 where possible. Thanks to the following contributors listed below for their contributions to this release. diff --git a/pyproject.toml b/pyproject.toml index 8d755dc..94f62a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,11 +66,30 @@ dist-dir = "build/dist" [tool.distutils.bdist_wheel] dist-dir = "build/dist" -# for black and mypy, set the lowest Python version supported -[tool.black] -quiet = true -target-version = ['py36'] -skip-string-normalization = true +[tool.ruff] +target-version = "py37" # Lowest python version supported +extend-include = ["SConstruct", "SConscript"] +extend-exclude = [ + "bench", + "bin", + "doc", + "src", + "template", + "test", + "testing", + "timings", + "SCons/Tool/docbook/docbook-xsl-1.76.1", + "bootstrap.py", + "runtest.py", +] + +[tool.ruff.format] +quote-style = "preserve" # Equivalent to black's "skip-string-normalization" + +[tool.ruff.lint.per-file-ignores] +"SCons/Util/__init__.py" = [ + "F401", # Module imported but unused +] [tool.mypy] -python_version = "3.6" +python_version = "3.6" # Lowest python version supported (v0.971 and below) |