[mypyc] ... inferred type None; add an annotation
on fully-annotated code
#17216
Labels
bug
mypy got something wrong
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
Possibly related to #7482 and #5423
To Reproduce
Run
mypyc
on the following snippet:Expected Behavior
Successful compilation
Actual Behavior
mypyc doesn't like the annotation
int | str | None
(if you add something unrelated to the union that doesn't exhaust theif...elif
stack, e.g.bytes
, the error goes away). What would be an alternative annotation which could be used here that reflectsint | str | None
, apart fromobject
ortyping.Any
?Your Environment
mypy.ini
(and other config files): NoneThe text was updated successfully, but these errors were encountered: