Are you reporting a bug, or opening a feature request?
Bug
Please insert below the code you are checking with mypy,
or a mock-up repro if the source is private. We would appreciate
if you try to simplify your case to a minimal repro.
changed the title [-]Unexpected error when inveriting object from Popen and overriding some method[/-][+]Unexpected error when inheriting a class from Popen and overriding some method in it[/+]on Oct 2, 2019
Activity
msullivan commented on Oct 2, 2019
Yeah this got introduced in 0.730. I need to spend some time tweaking the rules for __new__ return types maybe.
Only return a declared type from __new__ if it is a subtype of the class
Only return a declared type from __new__ if it is a subtype of the cl…