- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 3k
 
Closed
Labels
Description
Bug Report
new to 1.12.0
incorrect error message on union of two type one being memoryview
Complete file checked:
"""
a_type: type[memoryview] | type[str] = memoryview
"""
mypy 1.11.2 no error
mypy 1.12.0
Incompatible default for argument "a_type" (default has type "type[memoryview[Any]]", argument has type "type[memoryview[int]] | type[str]")
Your Environment
github action ubuntu various , python various
- Mypy command-line flags:
-no flags - Mypy configuration options from 
mypy.ini(and other config files): - None
 - Python version used: via github actions
3.8, 3.9, 3.10, 3.11, 3.12 and 3.13 
while
"""
a_type: type[memoryview] = memoryview
""""
Works ok!