summaryrefslogtreecommitdiff
path: root/testing/code
diff options
context:
space:
mode:
authorRan Benita <ran234@gmail.com>2019-07-08 10:04:19 +0300
committerAnthony Sottile <asottile@umich.edu>2019-07-09 12:12:07 -0700
commit89dfde95353651f12474621becd808e2330371da (patch)
treed11533d3bb63d4e3ef699ec1c35e3536bbd02408 /testing/code
parent628ff4d61908fb42bd9260fa910f1ddb082196df (diff)
downloadpytest-89dfde95353651f12474621becd808e2330371da.tar.gz
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.
Diffstat (limited to 'testing/code')
-rw-r--r--testing/code/test_excinfo.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/testing/code/test_excinfo.py b/testing/code/test_excinfo.py
index f7787c282..d7771833a 100644
--- a/testing/code/test_excinfo.py
+++ b/testing/code/test_excinfo.py
@@ -589,7 +589,8 @@ raise ValueError()
def test_repr_local_with_exception_in_class_property(self):
class ExceptionWithBrokenClass(Exception):
- @property
+ # Type ignored because it's bypassed intentionally.
+ @property # type: ignore
def __class__(self):
raise TypeError("boom!")