Open thepabloaguilar opened 1 year ago
This is probably due to #6042: https://github.com/python/mypy/blob/0f09be472cad7aa06ca4af9dd73aca6b87450d84/mypy/semanal.py#L2363-L2372 Can take a look @ilevkivskyi?
Since list
derives from a handful of protocols (e.g. Sequence
), its metaclass is ABCMeta
.
Changing
-class ListOfStrMeta(typing):
+class ListOfStrMeta(ABCMeta):
eliminates the error, though it's probably wrong since type(list) is type
.
Yes, this is due to the fact that typeshed
has Sequence
in the base classes of list
.
While runtime does not have it.
Bug Report
To Reproduce
Expected Behavior
No errors should appear
Actual Behavior
Error from the code above:
Your Environment
mypy.ini
(and other config files):disable_error_code = empty-body
allow_redefinition = false check_untyped_defs = true disallow_any_explicit = true
disallow_any_generics = true
disallow_untyped_calls = true ignore_errors = false ignore_missing_imports = true implicit_reexport = false local_partial_types = true strict_optional = true strict_equality = true no_implicit_optional = true warn_no_return = true warn_unused_ignores = true warn_redundant_casts = true warn_unused_configs = true warn_unreachable = true