test_ok2/testing/code
Ran Benita 9ab14c6d9c typing: set warn_unreachable
This makes mypy raise an error whenever it detects code which is
statically unreachable, e.g.

    x: int
    if isinstance(x, str):
        ... # Statement is unreachable  [unreachable]

This is really neat and finds quite a few logic and typing bugs.

Sometimes the code is intentionally unreachable in terms of types, e.g.
raising TypeError when a function is given an argument with a wrong
type. In these cases a `type: ignore[unreachable]` is needed, but I
think it's a nice code hint.
2020-08-04 09:59:46 +03:00
..
test_code.py Revert change to traceback repr (#7535) 2020-07-24 13:30:38 +02:00
test_excinfo.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_source.py typing: set warn_unreachable 2020-08-04 09:59:46 +03:00