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
Going through Mypy's tests, I realized that some tests are passing that shouldn't. This involves for example:
testConditionalFunctionDefinitionUsingDecorator3 (there's an error in the test that the test author probably didn't notice: Positional only args of a callable are never assignable to a normal function with positional-or-keyword params; typically an error in Mypy would look like this: Incompatible redefinition (redefinition with type "Callable[[int], None]", original type "Callable[[Arg(int, 'x')], None]"))
testConditionalFunctionDefinitionUsingDecorator4 (there's even a TODO in there that complains about this not being done)
Bug Report
Going through Mypy's tests, I realized that some tests are passing that shouldn't. This involves for example:
testConditionalFunctionDefinitionUsingDecorator3
(there's an error in the test that the test author probably didn't notice: Positional only args of a callable are never assignable to a normal function with positional-or-keyword params; typically an error in Mypy would look like this:Incompatible redefinition (redefinition with type "Callable[[int], None]", original type "Callable[[Arg(int, 'x')], None]")
)testConditionalFunctionDefinitionUsingDecorator4
(there's even a TODO in there that complains about this not being done)testNewAnalyzerConditionalDecoratedFunc
To Reproduce
https://mypy-play.net/?mypy=latest&python=3.12&gist=18b131da809d740eced20dd7652ea213
Expected Behavior
It would be nice if Mypy complained here (like in AFAIK all other conditional definitions).
I'm happy to assist if somebody wants to fix this.
The text was updated successfully, but these errors were encountered: