Skip to content

Commit

Permalink
Add comply-typing, start working toward PR #628
Browse files Browse the repository at this point in the history
  • Loading branch information
derks committed Jan 29, 2024
1 parent 16efbb3 commit 12fbe1d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ Misc:
- `[docker]` Base official Docker image on Python 3.12
- `[utils.version]` Resolve deprecated `datetime.utcfromtimestamp()`
- [Issue #661](https://github.com/datafolklabs/cement/issues/661)
- `[dev]` Add `comply-typing` to make helpers, start working toward typing.
- [Issue #599](https://github.com/datafolklabs/cement/issues/661)
- [PR #628](https://github.com/datafolklabs/cement/pull/628)


Deprecations:
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ comply:
comply-fix:
autopep8 -ri cement/ tests/

comply-typing:
mypy ./cement

docs:
python setup.py build_sphinx
@echo
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ mock
twine>=1.11.0
setuptools>=38.6.0
wheel>=0.31.0
mypy

# Required for optional extensions
pystache
Expand Down
19 changes: 19 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,22 @@ python_files=test_*.py

[flake8]
exclude = .git,cement/cli/templates,cement/cli/contrib

[mypy]
exclude = (?x)(
^cement/cli/templates |
^cement/cli/contrib |
^.git/ |
^tests
)

; https://mypy.readthedocs.io/en/stable/config_file.html#untyped-definitions-and-calls
disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
disallow_untyped_decorators = True

; https://mypy.readthedocs.io/en/stable/config_file.html#none-and-optional-handling
no_implicit_optional = True
strict_optional = True

0 comments on commit 12fbe1d

Please sign in to comment.