You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mypy has a strict mode that enables additional checks. Unfortunately, this mode can only be set globally, see python/mypy#11401. As we started with a code base without type annotations, setting it globally is not realistic at the moment. In the initial implementation, I just enabled disallow_untyped_defs for the new code to emulate the strict mode:
But strict mode actually includes many more settings that we should also enable. See this comment for an example configuration: python/mypy#11401 (comment)
The text was updated successfully, but these errors were encountered:
Strict mypy checks cannot be enabled on a per-module level, so we used
the disallow_untyped_defs option to replace them. But actually there
are many more options that would be set in strict mode. This patch adds
these options to the mypy configuration, fixes some missing or wrong
annotations and adds some ignores for more complex issues so that the
checks still pass.
Fixes: Nitrokey#443
mypy has a strict mode that enables additional checks. Unfortunately, this mode can only be set globally, see python/mypy#11401. As we started with a code base without type annotations, setting it globally is not realistic at the moment. In the initial implementation, I just enabled
disallow_untyped_defs
for the new code to emulate the strict mode:pynitrokey/pyproject.toml
Lines 85 to 94 in dc48ea4
But strict mode actually includes many more settings that we should also enable. See this comment for an example configuration: python/mypy#11401 (comment)
The text was updated successfully, but these errors were encountered: