Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesturk committed Nov 17, 2023
1 parent 0a41733 commit f0516b2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- name: lint with mypy
run: poetry run mypy src
- name: lint with flake8
run: poetry run flake8 --show-source --statistics --ignore=E203,E501,W503 src
- name: lint with ruff
run: poetry run ruff --show-source --statistics --ignore=E203,E501,W503 src
- name: pytest
run: poetry run pytest
2 changes: 1 addition & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Bug reports, questions, or feature requests can be submitted as [GitHub issues](

### Linting & Type Checking

`poetry run inv lint` will run flake8 and black to lint the code style.
`poetry run inv lint` will run ruff and black to lint the code style.

`poetry run inv mypy` will run the mypy type checker.

Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ ipython = {version = "^7.19.0", extras = ["shell"]}
[tool.poetry.dev-dependencies]
pytest = "^6.2.1"
pytest-cov = "^2.11.1"
flake8 = "^3"
black = "^22"
bump2version = "^1.0.1"
mypy = "^0.900"
Expand All @@ -48,6 +47,9 @@ importlib-metadata = "<5.0"
types-requests = "^0.1.11"
types-click = "^7.1.1"

[tool.poetry.group.dev.dependencies]
ruff = "^0.1.6"

[tool.mypy]
disallow_untyped_defs = true

Expand Down
2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def mypy(c):

@task
def lint(c):
c.run("poetry run flake8 src/ tests/ --ignore=E203,E501,W503", pty=True)
c.run("poetry run ruff src/ tests/ --ignore=E203,E501,W503", pty=True)
c.run("poetry run black --check src/ tests/", pty=True)


Expand Down

0 comments on commit f0516b2

Please sign in to comment.