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
Running mypy version 1.5.0 on it gives the spurious error
10: error: Incompatible types in assignment (expression has type "Namespace", variable has type "Options") [assignment]
a: Options = p.parse_args(namespace=Options())
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error in 1 file (checked 1 source file)
Running mypy version 1.3.0 on it passes.
The text was updated successfully, but these errors were encountered:
I bisected the issue to 59a6c5e. Seems like an issue with the argparse typing stubs.
Looks like it's already fixed in typeshed, however the sync didn't make it in time for this release. Probably in 1.6.0 then.
Yeah, the issue was cause by python/typeshed#10307, which made it into mypy v1.5. It's already been fixed on typeshed's main branch by python/typeshed#10387, but the fix unfortunately didn't make it into mypy v1.5.
Since python/typeshed#10387 was a fairly small PR, it could possibly be cherry-picked into the next mypy patch release. However, I know @svalentin has already created the mypy 1.5.1 tag, so I'm not sure if it's possible to get a fix into mypy 1.5.1 :/
(We also can't create any new mypy releases at all until pypi/support#3094 is resolved)
Here is a test case:
Running mypy version 1.5.0 on it gives the spurious error
Running mypy version 1.3.0 on it passes.
The text was updated successfully, but these errors were encountered: