Skip to content

Commit 70638da

Browse files
committed
MAINT: Use ruff for linting
Ruff is an extremely fast and comprehensive linter.
1 parent f3ab7e4 commit 70638da

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ jobs:
4040
run: |
4141
python -m pip install --upgrade pip poetry
4242
poetry env use ${{ matrix.python-version }}
43-
poetry install --with=test --with=lint
43+
poetry install --with=lint
4444
4545
- name: Lint with flake8
4646
run: |
4747
set -euo pipefail
48-
# stop the build if there are Python syntax errors or undefined names
49-
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
50-
# The GitHub editor is 127 chars wide
51-
poetry run flake8 . --ignore=F401,F403,W503,E226 --count --max-complexity=10 --max-line-length=127 --statistics
48+
# Tell us what version we are using
49+
poetry run ruff version
50+
# Check the source file, ignore type annotations (ANN) for now.
51+
poetry run ruff check numpy_financial/ --ignore F403,Q000,ANN --select ALL

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,7 @@ numpydoc = "^1.5"
5252
pydata-sphinx-theme = "^0.14.3"
5353

5454

55+
5556
[tool.poetry.group.lint.dependencies]
56-
flake8 = "*"
57+
ruff = "^0.1.6"
58+

0 commit comments

Comments
 (0)