Skip to main content

Switch to using uv and ruff

ID
026df88
date
2024-06-02 09:23:57+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
a9517da
message
Switch to using `uv` and `ruff`

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

Changed files

.github/workflows/test.yml (1231) → .github/workflows/test.yml (627)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 2dddad5..7013989 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -28,17 +28,8 @@ jobs:
 
     - name: Run linting
       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
-        #
-        # F821 = undefined name, which I need because there are bits in my
-        # Python expansions that are used by Alfred and which Python doesn't
-        # know what to do with, imports I expect will be elsewhere, etc.
-        flake8 --ignore=E501,E203,W503,F821 --extend-select=W504
+        ruff check .
+        ruff format --check .
 
     - name: Check types
       run: mypy *.py

dev_requirements.in (18) → dev_requirements.in (10)

diff --git a/dev_requirements.in b/dev_requirements.in
index 355ed83..8881953 100644
--- a/dev_requirements.in
+++ b/dev_requirements.in
@@ -1,3 +1,2 @@
-black
-flake8
 mypy
+ruff

dev_requirements.txt (604) → dev_requirements.txt (308)

diff --git a/dev_requirements.txt b/dev_requirements.txt
index e7a1e32..5c2aa7e 100644
--- a/dev_requirements.txt
+++ b/dev_requirements.txt
@@ -1,32 +1,10 @@
-#
-# This file is autogenerated by pip-compile with Python 3.12
-# by the following command:
-#
-#    pip-compile dev_requirements.in
-#
-black==24.4.2
-    # via -r dev_requirements.in
-click==8.1.7
-    # via black
-flake8==7.0.0
-    # via -r dev_requirements.in
-mccabe==0.7.0
-    # via flake8
+# This file was autogenerated by uv via the following command:
+#    uv pip compile dev_requirements.in --output-file dev_requirements.txt
 mypy==1.10.0
     # via -r dev_requirements.in
 mypy-extensions==1.0.0
-    # via
-    #   black
-    #   mypy
-packaging==24.0
-    # via black
-pathspec==0.12.1
-    # via black
-platformdirs==4.2.2
-    # via black
-pycodestyle==2.11.1
-    # via flake8
-pyflakes==3.2.0
-    # via flake8
+    # via mypy
+ruff==0.4.7
+    # via -r dev_requirements.in
 typing-extensions==4.11.0
     # via mypy