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
fromtypingimportTypeGuardclassA:
def__call__(self, a) ->TypeGuard[int]:
returnTruea: Aasserta(a=1)
> mypy test.py --tbtest.py:7: error: INTERNAL ERROR -- Please try using mypy master on GitHub:https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-buildPlease report a bug at https://github.com/python/mypy/issuesversion: 1.5.1Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "mypy\checker.py", line 584, in accept # least one type that we don't know. File "mypy\nodes.py", line 1435, in accept File "mypy\checker.py", line 4409, in visit_assert_stmt return # The partial type is None. File "mypy\checker.py", line 5455, in find_isinstance_check return [typ], [] File "mypy\checker.py", line 5501, in find_isinstance_check_helper """AssertionError:test.py:7: : note: use --pdb to drop into pdb
The text was updated successfully, but these errors were encountered:
Fixes#16187
Note there may be some more similar crashes, I don't handle them all
properly, for now I leave a TODO and replace the `assert` with `if`, so
at least we should not crash on an unhandled case.
The text was updated successfully, but these errors were encountered: