Skip to content

ImportError: cannot import name 'TypeVarDef' from 'mypy.types' #11767

Closed
@adam-pawluczuk

Description

@adam-pawluczuk

Bug Report

TypeVarDef raises an ImportError.

To Reproduce

  1. On Python 3.8.9, when doing:

from mypy.types import TypeVarDef

I get this:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'TypeVarDef' from 'mypy.types' (/Users/username/Library/Python/3.8/lib/python/site-packages/mypy/types.py)

Expected Behavior

No errors.

Actual Behavior

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'TypeVarDef' from 'mypy.types' (/Users/username/Library/Python/3.8/lib/python/site-packages/mypy/types.py)

Your Environment

  • Mypy version used: 0.920
  • Mypy command-line flags:
  • Mypy configuration options from mypy.ini (and other config files):
  • Python version used: 3.8.9
  • Operating system and version: MacOS 12.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions