Open PythonCoderAS opened 9 months ago
The problem is that you made all arguments optional by giving them default values. This means all overloads match an invocation without any arguments. And it's also wrong: the arguments never have True
as the default value in your implementation. If you remove = True
everywhere, it works: https://mypy-play.net/?mypy=latest&python=3.12&gist=33e891d0d674a04be9de77239fa12bfd
If you define all overloaded cases for different boolean variables, Mypy still complains about overloaded functions having non-overlapping return types.
(A clear and concise description of what the bug is.)
To Reproduce
https://mypy-play.net/?mypy=latest&python=3.12&gist=c335d619eb28830e11ccc147bb974752
Actual Behavior
Your Environment
mypy.ini
(and other config files): No config file