Closed
Description
Feature Request
Extend feature added in #424 to allow subclasses to also specialize method parameters that contain Union
type.
Code example
class A():
def x(self, x: Union[Dict, List]):
pass
class B(A):
def x(self, x: Dict):
pass
mypy output
error: Argument 1 of "x" incompatible with supertype "A"
Expected output
Nothing :)
mypy/python version
mypy 0.641
Python 3.6.7
Metadata
Metadata
Assignees
Labels
No labels