Skip to content

Commit

Permalink
Update mypy typing based on cruft updates (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
allenporter committed May 12, 2024
1 parent 951f2c6 commit 73ac864
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/allenporter/cookiecutter-python",
"commit": "fa32728e64c6946fba7ea2477e77def141582b3b",
"commit": "01be0fce0f141c3e4f80564707a62aa9dab35c21",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
hooks:
- id: mypy
name: mypy
entry: script/run-mypy
entry: script/run-mypy.sh
language: script
types: [python]
require_serial: true
Expand Down
24 changes: 24 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,27 @@ exclude = [
"examples/",
"venv/",
]
platform = "linux"
show_error_codes = true
follow_imports = "normal"
local_partial_types = true
strict_equality = true
no_implicit_optional = true
warn_incomplete_stub = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = true
disable_error_code = [
"import-untyped",
]
extra_checks = false
disallow_subclassing_any = true
disallow_untyped_decorators = false

# TODO: Enable these error codes below after cleaning up
disallow_incomplete_defs = false
disallow_untyped_defs = false
warn_return_any = false
check_untyped_defs = false
disallow_untyped_calls = false
warn_unreachable = false
2 changes: 0 additions & 2 deletions script/run-mypy.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

set -o errexit

# Change directory to the project root directory.
cd "$(dirname "$0")"

pip3 install -r requirements_dev.txt --no-input --quiet

Expand Down

0 comments on commit 73ac864

Please sign in to comment.