Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@

## Checklist before requesting a review
<!--- These are suggested things you could add, but what you add will be dependent on your repository's standards. --->
- [ ] This is an example of a checklist item
- [ ] The code runs successfully.

```python
print("Oh, it def does run successfully.")
```

- [ ] I ran `make lint` and have made the bulk of changes that it has requested.
- [ ] The `Lint` GitHub Action step is passing.
- Manually run `make format` to correct the errors.
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
Black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: psf/black@stable
with:
options: --check --verbose
version: ~= 23.1.0
ISort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: isort/isort-action@master
with:
configuration: --check-only --diff
requirementsFiles: pyproject.toml
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ BASEDIR=project

.PHONY: format
format:
black ${BASEDIR}/ test/ --line-length=80
isort --profile black ${BASEDIR}/ test/
black ${BASEDIR}/ test/
isort ${BASEDIR}/ test/

.PHONY: lint
lint:
Expand Down
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ pytest = "^7.2.2"
responses = "^0.23.1"
isort = "^5.12.0"

[tool.black]
line-length = 80

[tool.isort]
profile = "black"
profile= "black"
line_length = 80
skip = [".gitignore", "project/data/"]

[build-system]
requires = ["poetry-core"]
Expand Down