Skip to main content

Switch to using ruff for formatting

ID
c327067
date
2024-06-02 09:40:02+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
06e5eed
message
Switch to using `ruff` for formatting

For https://github.com/alexwlchan/alexwlchan/issues/9
changed files
3 files, 6 additions, 31 deletions

Changed files

.github/workflows/main.yml (1149) → .github/workflows/main.yml (765)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 8e09909..f82a14d 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -29,14 +29,8 @@ jobs:
 
       - name: Check formatting
         run: |
-          black --check .
-
-          # E501 = line too long; anything up to 100-ish is fine in my book
-          # (the "ish" is intentional; see https://www.youtube.com/watch?v=wf-BqAjZb8M)
-          #
-          # E203/W503/W504 = this is where black and flake8 conflict,
-          # see https://black.readthedocs.io/en/stable/faq.html#why-are-flake8-s-e203-and-w503-violated
-          flake8 --ignore=E501,E203,W503 --extend-select=W504
+          ruff check .
+          ruff format --check .
 
       - name: Run test suite
         run: |

dev_requirements.in (24) → dev_requirements.in (16)

diff --git a/dev_requirements.in b/dev_requirements.in
index ac72043..c6ec9f6 100644
--- a/dev_requirements.in
+++ b/dev_requirements.in
@@ -1,3 +1,2 @@
-black
-flake8
 pytest-cov
+ruff

dev_requirements.txt (713) → dev_requirements.txt (404)

diff --git a/dev_requirements.txt b/dev_requirements.txt
index be1759e..ff0d20c 100644
--- a/dev_requirements.txt
+++ b/dev_requirements.txt
@@ -1,34 +1,16 @@
 # This file was autogenerated by uv via the following command:
 #    uv pip compile dev_requirements.in --output-file dev_requirements.txt
-black==24.4.2
-    # via -r dev_requirements.in
-click==8.1.7
-    # via black
 coverage==7.5.1
     # via pytest-cov
-flake8==7.0.0
-    # via -r dev_requirements.in
 iniconfig==2.0.0
     # via pytest
-mccabe==0.7.0
-    # via flake8
-mypy-extensions==1.0.0
-    # via black
 packaging==24.0
-    # via
-    #   black
-    #   pytest
-pathspec==0.12.1
-    # via black
-platformdirs==4.2.1
-    # via black
+    # via pytest
 pluggy==1.5.0
     # via pytest
-pycodestyle==2.11.1
-    # via flake8
-pyflakes==3.2.0
-    # via flake8
 pytest==8.2.0
     # via pytest-cov
 pytest-cov==5.0.0
     # via -r dev_requirements.in
+ruff==0.4.7
+    # via -r dev_requirements.in