Bläddra i källkod

Use ruff==0.1.9 in CI

Kentaro Wada 1 år sedan
förälder
incheckning
8eb9acf4d6
3 ändrade filer med 6 tillägg och 11 borttagningar
  1. 3 8
      .github/workflows/ci.yml
  2. 2 2
      README.md
  3. 1 1
      requirements-dev.txt

+ 3 - 8
.github/workflows/ci.yml

@@ -61,17 +61,12 @@ jobs:
       run: |
         pip install .
 
-    - name: Lint with flake8
+    - name: Run ruff
       shell: bash -l {0}
       if: matrix.os != 'windows-latest'
       run: |
-        flake8 labelme/
-
-    - name: Black
-      shell: bash -l {0}
-      if: matrix.os != 'windows-latest'
-      run: |
-        black --line-length 79 --check --diff labelme/
+        ruff format --check
+        ruff check
 
     - name: Test with pytest
       shell: bash -l {0}

+ 2 - 2
README.md

@@ -226,8 +226,8 @@ See `.github/workflows/ci.yml` for more detail.
 ```bash
 pip install -r requirements-dev.txt
 
-flake8 .
-black --line-length 79 --check labelme/
+ruff format --check  # `ruff format` to auto-fix
+ruff check  # `ruff check --fix` to auto-fix
 MPLBACKEND='agg' pytest -vsx tests/
 ```
 

+ 1 - 1
requirements-dev.txt

@@ -1,5 +1,5 @@
 github2pypi==1.0.0
 pytest
 pytest-qt
-ruff
+ruff==0.1.9
 twine