Skip to content

Commit

Permalink
Replace lint.sh with invoke
Browse files Browse the repository at this point in the history
  • Loading branch information
dmerejkowsky committed Apr 3, 2021
1 parent 771ce82 commit 743dee1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ jobs:
python -m poetry install
- name: Run linters
run: ./lint.sh
run: python -m poetry run invoke lint

- name: Check that doc builds without warnings
run: python -m poetry run mkdocs build
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ $ poetry install
* Run linters and tests:

```console
$ ./lint.sh
$ poetry run invoke lint
$ poetry run pytest -n auto
```

Expand Down
16 changes: 12 additions & 4 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,18 @@ def mypy(c, machine_readable=False):

@task
def test(c):
c.run("pytest")


@task(pre=[call(black, check=True), call(isort, check=True), call(flake8), call(mypy)])
print("Running pytest")
c.run("pytest -n auto")


@task(
pre=[
call(black, check=True),
call(isort, check=True),
call(flake8),
call(mypy),
]
)
def lint(c):
pass

Expand Down

0 comments on commit 743dee1

Please sign in to comment.