Skip to content

Add stricter mypy rules#243

Merged
fohrloop merged 5 commits into
devfrom
stricter-mypy-pt2
Apr 12, 2024
Merged

Add stricter mypy rules#243
fohrloop merged 5 commits into
devfrom
stricter-mypy-pt2

Conversation

@fohrloop
Copy link
Copy Markdown
Member

@fohrloop fohrloop commented Apr 12, 2024

Add stricter mypy rules

New rules

disallow_any_unimported = true
warn_unused_ignores = true

exclude folders better

exclude folders from mypy a bit better (mypy has to do less unnecessary
work)

Build when running tox -e check

Also removed the skip_intall=True in tox 'check' environment. (this made
things easier as wakepy.init requires wakepy._version to be present
which is created in a build step, which is only done if skip_install is
not True, and if the wakepy._version is not available, mypy would complain
about it. And if we ignore the import line, mypy will next complain about
unused ignores (when the wakepy._version file is present).

@fohrloop fohrloop force-pushed the stricter-mypy-pt2 branch from 9f76d67 to 330c246 Compare April 12, 2024 20:41
that seems to be required.
Also removed the skip_intall=True in tox 'check' environment. (this made
things easier as wakepy.__init__ requires wakepy._version to be present
which is created in a build step, which is only done if skip_install is
not True, and if the wakepy._version is not available, mypy would complain
about it. And if we ignore the import line, mypy will next complain about
unused ignores (when the wakepy._version file is present).
@fohrloop fohrloop changed the title Stricter mypy pt2 Add stricter mypy rules Apr 12, 2024
@fohrloop fohrloop merged commit 61a62e6 into dev Apr 12, 2024
@fohrloop fohrloop deleted the stricter-mypy-pt2 branch April 12, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant