-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wrongfalse-positivemypy gave an error on correct codemypy gave an error on correct codepriority-1-normal
Description
Class D
in the example below is rejected, even though class E
, which looks very similar, is accepted:
from typing import Any
a: Any
class C(a): pass # Ok
def f(b: Any) -> None:
class D(b): pass # Errors: Invalid type "b"; Invalid base class
def g(c: Any) -> None:
d: Any = c
class E(d): pass # Ok
The above example shouldn't generate errors.
(Originally reported by @germaniumhq in #2477 (comment).)
Victor-Savu, patrick91, AndrewIngram, svalentin, stkrp and 15 more
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongfalse-positivemypy gave an error on correct codemypy gave an error on correct codepriority-1-normal