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

Add mypy checks #5

Closed
wants to merge 6 commits into from
Closed
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
42 changes: 36 additions & 6 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:


jobs:
lint:
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -23,9 +23,39 @@ jobs:
python-version: 3.9

- name: install dependencies
run: |
make venv
run: make venv

- name: run codestyle
run: |
make lint
- name: run flake8
run: make flake8

black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: set up python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: install dependencies
run: make venv

- name: run black
run: make black

mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: set up python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: install dependencies
run: make venv

- name: run mypy
run: make mypy
14 changes: 11 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,23 @@ format: venv
black --line-length=120 . --exclude venv*,build
.PHONY: format

lint: venv
flake8: venv
flake8 --max-line-length 120 . --exclude venv*,build
.PHONY: flake8

black: venv
@set -e && black --line-length=120 --check . --exclude venv*,build|| ( \
echo "================================"; \
echo "Bad formatting? Run: make format"; \
echo "================================"; \
false)
# TODO: Add mypy testing
# @mypy . --exclude venv*,build
.PHONY: black

mypy: venv
mypy . --exclude venv*,build
.PHONY: mypy

lint: flake8 black mypy
.PHONY: lint

docker_up:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def merge_req_lists(req_lists: Iterable[List[str]]) -> List[str]:
]

mypy_dependencies = [
"mypy",
"mypy==0.991",
]

sqlite_dependencies = [
Expand Down