Add rudimentary mypy type checking
Add a very lax mypy configuration, add it to tox -e linting, and fix/ignore the few errors that come up. The idea is to get it running before diving in too much. This enables: - Progressively adding type annotations and enabling more strict options, which will improve the codebase (IMO). - Annotating the public API in-line, and eventually exposing it to library users who use type checkers (with a py.typed file). Though, none of this is done yet. Refs https://github.com/pytest-dev/pytest/issues/3342.
This commit is contained in:
@@ -6,7 +6,8 @@ import pytest
|
||||
from _pytest.debugging import _validate_usepdb_cls
|
||||
|
||||
try:
|
||||
breakpoint
|
||||
# Type ignored for Python <= 3.6.
|
||||
breakpoint # type: ignore
|
||||
except NameError:
|
||||
SUPPORTS_BREAKPOINT_BUILTIN = False
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user