Pamela Fox
commited on
Commit
·
93cf63b
1
Parent(s):
78b97ed
From flake8 to ruff
Browse files- .flake8 +0 -5
- .github/workflows/check.yaml +3 -5
- .pre-commit-config.yaml +3 -4
- pyproject.toml +5 -1
- requirements-dev.txt +1 -1
.flake8
DELETED
|
@@ -1,5 +0,0 @@
|
|
| 1 |
-
[flake8]
|
| 2 |
-
ignore = D203
|
| 3 |
-
max-complexity = 10
|
| 4 |
-
max-line-length = 120
|
| 5 |
-
exclude = .venv
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.github/workflows/check.yaml
CHANGED
|
@@ -23,12 +23,10 @@ jobs:
|
|
| 23 |
run: |
|
| 24 |
python -m pip install --upgrade pip
|
| 25 |
pip install -r requirements-dev.txt
|
| 26 |
-
- name: Lint with
|
| 27 |
run: |
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
# exit-zero treats all errors as warnings.
|
| 31 |
-
flake8 . --count --exit-zero --statistics
|
| 32 |
- name: Check formatting with black
|
| 33 |
uses: psf/black@stable
|
| 34 |
with:
|
|
|
|
| 23 |
run: |
|
| 24 |
python -m pip install --upgrade pip
|
| 25 |
pip install -r requirements-dev.txt
|
| 26 |
+
- name: Lint with ruff
|
| 27 |
run: |
|
| 28 |
+
ruff quizsite/
|
| 29 |
+
ruff quizzes/
|
|
|
|
|
|
|
| 30 |
- name: Check formatting with black
|
| 31 |
uses: psf/black@stable
|
| 32 |
with:
|
.pre-commit-config.yaml
CHANGED
|
@@ -10,9 +10,8 @@ repos:
|
|
| 10 |
hooks:
|
| 11 |
- id: black
|
| 12 |
args: ['--config=./pyproject.toml']
|
| 13 |
-
- repo: https://
|
| 14 |
-
rev:
|
| 15 |
hooks:
|
| 16 |
-
- id:
|
| 17 |
exclude: '.venv/'
|
| 18 |
-
args: ['--config=.flake8']
|
|
|
|
| 10 |
hooks:
|
| 11 |
- id: black
|
| 12 |
args: ['--config=./pyproject.toml']
|
| 13 |
+
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
| 14 |
+
rev: v0.0.121
|
| 15 |
hooks:
|
| 16 |
+
- id: ruff
|
| 17 |
exclude: '.venv/'
|
|
|
pyproject.toml
CHANGED
|
@@ -7,4 +7,8 @@ exclude = '''
|
|
| 7 |
| migrations
|
| 8 |
)/
|
| 9 |
|
| 10 |
-
'''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
| migrations
|
| 8 |
)/
|
| 9 |
|
| 10 |
+
'''
|
| 11 |
+
|
| 12 |
+
[tool.ruff]
|
| 13 |
+
line-length = 120
|
| 14 |
+
ignore = ['D203']
|
requirements-dev.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
-r requirements.txt
|
| 2 |
black
|
| 3 |
pre-commit
|
| 4 |
-
|
| 5 |
coverage
|
|
|
|
| 1 |
-r requirements.txt
|
| 2 |
black
|
| 3 |
pre-commit
|
| 4 |
+
ruff
|
| 5 |
coverage
|