forked from baal-org/baal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
baal-org#130 Add mypy and step to test imports (baal-org#155)
- Loading branch information
Frédéric Branchaud-Charron
authored
Oct 12, 2021
1 parent
a9cc003
commit 82df3d4
Showing
22 changed files
with
320 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,30 @@ | ||
lint: | ||
.PHONY: lint | ||
lint: check-mypy-error-count | ||
poetry run flake8 baal | ||
|
||
.PHONY: test | ||
test: lint | ||
poetry run pytest tests --cov=baal | ||
|
||
.PHONY: format | ||
format: | ||
poetry run black baal | ||
|
||
.PHONY: requirements.txt | ||
requirements.txt: poetry.lock | ||
poetry export --without-hashes -f requirements.txt > requirements.txt | ||
poetry export --without-hashes -f requirements.txt > requirements.txt | ||
|
||
.PHONY: mypy | ||
mypy: | ||
poetry run mypy --show-error-codes baal | ||
|
||
|
||
.PHONY: check-mypy-error-count | ||
check-mypy-error-count: MYPY_INFO = $(shell expr `poetry run mypy baal | grep ": error" | wc -l`) | ||
check-mypy-error-count: MYPY_ERROR_COUNT = 16 | ||
|
||
check-mypy-error-count: | ||
@if [ ${MYPY_INFO} -gt ${MYPY_ERROR_COUNT} ]; then \ | ||
echo mypy error count $(MYPY_INFO) is more than $(MYPY_ERROR_COUNT); \ | ||
false; \ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.