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
In the following code, the presence of the last line (the call to foo_meta) causes mypy to emit an error without a line number and which cannot be ignored.
classFooMeta(type):
passclassFoo(metaclass=FooMeta):
passfoo_meta=type(Foo)
reveal_type(foo_meta) # shows: Revealed type is 'Type[def () -> foo.Foo]'foo_meta("Bar", (Foo,), {})
The error is:
foo.py: error: Unsupported type Type["Type[Foo]"]
I would expect that even if mypy were unable to determine the types here I would be able to ignore the error with a suitably placed # type: ignore (instead I get a warning about an unused ignore). Ideally the usage wouldn't error at all though.
Python: 3.5.2 mypy: 0.701 (verified still an issue under 0.711, the latest at the time of writing)
The text was updated successfully, but these errors were encountered:
In the following code, the presence of the last line (the call to
foo_meta
) causesmypy
to emit an error without a line number and which cannot be ignored.The error is:
I would expect that even if
mypy
were unable to determine the types here I would be able to ignore the error with a suitably placed# type: ignore
(instead I get a warning about an unused ignore). Ideally the usage wouldn't error at all though.Python: 3.5.2
mypy
: 0.701 (verified still an issue under 0.711, the latest at the time of writing)The text was updated successfully, but these errors were encountered: