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
It seems that mypy doesn't like from x import y statements inside classes. While maybe unusual, from dataclasses import replace is quite handy.
Traceback
Running as mypy --show-traceback a.py, on commit 8e909e4.
a.py:4: error: INTERNAL ERROR -- Please try using mypy master on Github:
https://mypy.rtfd.io/en/latest/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 0.812
Traceback (most recent call last):
File "mypy/checkexpr.py", line 3898, in accept
File "mypy/nodes.py", line 1507, in accept
File "mypy/checkexpr.py", line 2025, in visit_member_expr
File "mypy/checkexpr.py", line 2043, in analyze_ordinary_member_access
File "mypy/checkmember.py", line 126, in analyze_member_access
File "mypy/checkmember.py", line 143, in _analyze_member_access
File "mypy/checkmember.py", line 219, in analyze_instance_member_access
File "mypy/maptype.py", line 20, in map_instance_to_supertype
AttributeError: attribute 'type_vars' of 'TypeInfo' undefined
a.py:4: : note: use --pdb to drop into pdb
To Reproduce
a.py:
classA:
frombimportfooprint(A().foo()) # ← INTERNAL ERROR here
Crash Report
It seems that mypy doesn't like
from x import y
statements inside classes. While maybe unusual,from dataclasses import replace
is quite handy.Traceback
Running as
mypy --show-traceback a.py
, on commit 8e909e4.To Reproduce
a.py
:b.py
:Your Environment
mypy --show-traceback a.py
mypy.ini
(and other config files): NoneThe text was updated successfully, but these errors were encountered: