Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak linting target #171

Merged
merged 2 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ make lint
* [`interrogate`](https://interrogate.readthedocs.io/en/latest/): Documentation coverage


To automatically apply any lint-suggested changes, you can run:

```bash
make reformat
```

### Testing

You can run the tests locally with:
Expand Down
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,17 @@ run:
.PHONY: lint
lint:
. env/bin/activate && \
black $(ALL_PY_SRCS) && \
isort $(ALL_PY_SRCS) && \
black --check $(ALL_PY_SRCS) && \
isort --check $(ALL_PY_SRCS) && \
flake8 $(ALL_PY_SRCS) && \
mypy $(PY_MODULE) && \
bandit -c pyproject.toml -r $(PY_MODULE)

git diff --exit-code
.PHONY: reformat
reformat:
. env/bin/activate && \
black $(ALL_PY_SRCS) && \
isort $(ALL_PY_SRCS)

.PHONY: test
test:
Expand Down