Skip to content

Internal Error: maptype.py: AttributeError: attribute 'type_vars' of 'TypeInfo' undefined #7806

Closed
@sebastian-philipp

Description

@sebastian-philipp
  • Are you reporting a bug, or opening a feature request?

Bug

  • Please insert below the code you are checking with mypy,
    or a mock-up repro if the source is private. We would appreciate
    if you try to simplify your case to a minimal repro.

Hints on how to simply create a minimal example are appreciated.

  • What is the actual behavior/output?
dashboard/plugins/plugin.py: note: In member "get_options" of class "SimplePlugin":
dashboard/plugins/plugin.py:20: error: "SimplePlugin" has no attribute "OPTIONS"
dashboard/plugins/plugin.py:24: 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.740
Traceback (most recent call last):
  File "mypy/checkexpr.py", line 3603, in accept
  File "mypy/nodes.py", line 1484, in accept
  File "mypy/checkexpr.py", line 1887, in visit_member_expr
  File "mypy/checkexpr.py", line 1899, in analyze_ordinary_member_access
  File "mypy/checkmember.py", line 117, in analyze_member_access
  File "mypy/checkmember.py", line 134, in _analyze_member_access
  File "mypy/checkmember.py", line 210, in analyze_instance_member_access
  File "mypy/checkmember.py", line 359, in analyze_member_var_access
  File "mypy/checkmember.py", line 517, in analyze_var
  File "mypy/maptype.py", line 20, in map_instance_to_supertype
AttributeError: attribute 'type_vars' of 'TypeInfo' undefined
dashboard/plugins/plugin.py:24: : note: use --pdb to drop into pdb
  • What are the versions of mypy and Python you are using?

0.740

  • Do you see the same issue after installing mypy from Git master?

Not checked yet.

  • What are the mypy flags you are using? (For example --strict-optional)
[mypy]
strict_optional = True
no_implicit_optional = True
ignore_missing_imports = True
warn_incomplete_stub = True
check_untyped_defs = True
show_error_context = True
  • Reproducable with
git clone --depth 1 --single-branch --branch mypy-mgr_module https://github.com/sebastian-philipp/ceph.git
cd ceph/src 
script/run_mypy.sh

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions