Skip to content

Commit

Permalink
Add mypy ignore modules includes
Browse files Browse the repository at this point in the history
Add a couple of includes for per-project customisation of which modules
we tell mypy to ignore.

This also tidies up the formatting of this section of pyproject.toml a
little, which unfortunately will mean a change to every single project.

This is extracted from
#188 as a separate PR.
  • Loading branch information
seanh committed Jan 17, 2025
1 parent 7a99520 commit 2309717
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions _shared/project/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,16 @@ exclude = [
{% endif %}

[[tool.mypy.overrides]]
module= [
# Don't try to typecheck the tests for now
module = [
{% if include_exists("mypy/ignore_errors_modules") %}
{{- include("mypy/ignore_errors_modules", indent=2) -}}
{% else %}
# Don't try to typecheck the tests for now.
"tests.*",
{% endif %}
{% if include_exists("mypy/ignore_errors_modules/tail") %}
{{- include("mypy/ignore_errors_modules/tail", indent=2) -}}
{% endif %}
]
ignore_errors = true
{% if include_exists("pyproject.toml") %}
Expand Down

0 comments on commit 2309717

Please sign in to comment.