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
{{ message }}
Repository navigation
First overload picked overeagerly when overloading on self type #14070
I can confirm that this is still an issue with mypy 1.15, especially for mypyc users when subprocess.Popen (or similar) is called with stdout=subprocess.DEVNULL
Btw I think a bigger issue (in this particular example) is that we randomly choose first constraint when a type argument is not given instead of Any (i.e. reveal_type(p) gives Popen[str] in this example). Changing this may be risky, but something that we could potentially try at some point.
The overload selection part will be fixed by #22011 when it is ready.
Activity
mr-c commentedon Feb 5, 2025
I can confirm that this is still an issue with mypy 1.15, especially for mypyc users when
subprocess.Popen(or similar) is called withstdout=subprocess.DEVNULLilevkivskyi commentedon Sep 20, 2026
Btw I think a bigger issue (in this particular example) is that we randomly choose first constraint when a type argument is not given instead of
Any(i.e.reveal_type(p)givesPopen[str]in this example). Changing this may be risky, but something that we could potentially try at some point.The overload selection part will be fixed by #22011 when it is ready.