Skip to content

Commit

Permalink
Switched from flake8 to ruff as linter
Browse files Browse the repository at this point in the history
  • Loading branch information
heuer committed Feb 21, 2024
1 parent 902ee4c commit 06bd56c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ jobs:
run: |
sudo apt -y install libzbar0
pip install -r tests/requirements.txt
pip install flake8
pip install ruff
pip install mypy
- name: Run tests
run: |
pytest
- name: Run lint tests
if: ${{ matrix.python-version == '3.12' }}
run: |
flake8 segno
flake8 tests/
ruff .
mypy segno
7 changes: 3 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,11 @@ def coverage(session):
@nox.session(python=_PY_DEFAULT_VERSION)
def lint(session):
"""\
Run flake8
Run linters.
"""
session.install('flake8', 'mypy')
session.install('ruff', 'mypy')
session.run('mypy', 'segno')
session.run('flake8', 'segno')
session.run('flake8', 'tests')
session.run('ruff', '.')


@nox.session(python=_PY_DEFAULT_VERSION)
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ exclude = [".github", ".*", "sandbox/*"]
[tool.flit.external-data]
directory = "data"


[tool.ruff]
exclude = ['examples']

0 comments on commit 06bd56c

Please sign in to comment.