Skip to content

Commit

Permalink
Add poethepoet tasks for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsasha committed Mar 6, 2023
1 parent a5c2f2b commit a52d2b6
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 7 deletions.
9 changes: 4 additions & 5 deletions docs/development/development-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,12 @@ Linting and formatting
----------------------

In addition to the tests, this project uses `mypy`, `ruff`, `isort` and `black`
for style checking. To run these, run::
for style checking. Some are in a poe task for convenience. To run these, run::

mypy irrd
ruff irrd
isort irrd
black irrd

poe lint
# To run ruff with auto fix:
poe ruff-fix

Exclusions from checks
----------------------
Expand Down
1 change: 1 addition & 0 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ preloaded
preloader
preloading
preloads
poe
pubsub
py
rc
Expand Down
35 changes: 33 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ ruff = "^0.0.252"
isort = "^5.12.0"
black = "^23.1.0"
setuptools-scm = "^7.1.0"
poethepoet = "^0.18.1"

[tool.poetry.group.docs.dependencies]
sphinx = "^6.1.3"
Expand Down Expand Up @@ -111,6 +112,15 @@ install_types = true
non_interactive = true
exclude = "irrd/storage/alembic/*"

[tool.poe.tasks]
black = "black irrd"
ruff = "ruff irrd"
ruff-fix = "ruff irrd --fix"
isort = "isort irrd"
mypy = "mypy irrd"
lint = ["black", "ruff", "isort"]
test = "pytest --cov-report term-missing:skip-covered --cov=irrd --basetemp=.tmpdirs/ irrd"

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
Expand Down

0 comments on commit a52d2b6

Please sign in to comment.