Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.

Commit 799c923

Browse files
authored
Merge pull request #4 from agblox/mypy
ci: add mypy check target
2 parents 1b81dd6 + 50afe4c commit 799c923

File tree

6 files changed

+119
-4
lines changed

6 files changed

+119
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ __pycache__/
1212
.coverage
1313
.venv
1414
.pytest_cache
15+
.mypy_cache

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ check: ## Run pre-commit against all files
1919
tests: ## Run tests
2020
poetry run pytest
2121

22+
test-mypy: ## Run type check
23+
poetry run mypy
24+
2225
secrets-baseline-create: ## Create .secrets.baseline file
2326
poetry run detect-secrets scan --exclude-files poetry.lock > .secrets.baseline
2427

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ You can use [this][a] playbook for automated tools installation(Ubuntu only).
2525
### Build
2626
### Deploy
2727
### Test
28-
Run `make tests`
28+
- Test suit: `make tests`
29+
- Type hints: `make test-mypy`
2930
### Contribute
3031

3132
[g]: https://www.atlassian.com/git/tutorials/install-git

mypy.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Global options:
2+
[mypy]
3+
python_version = 3.8
4+
files = **/*.py

poetry.lock

Lines changed: 107 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ pytest = { version = "^6.1.1", optional = true }
1616
pytest-cov = { version = "^2.10.1", optional = true }
1717
pytest-dotenv = { version = "^0.5.2", optional = true }
1818
detect-secrets = { version = "^1.0.3", optional = true }
19+
mypy = { version = "^0.812", optional = true }
1920

2021
# package deps
2122

2223
[tool.poetry.extras]
23-
dev = ["pytest", "pytest-cov", "pytest-dotenv"]
24+
dev = ["pytest", "pytest-cov", "pytest-dotenv", "mypy"]
2425

2526
[tool.poetry.urls]
2627
issues = "https://github.com/agblox/replace-me"

0 commit comments

Comments
 (0)