The revealed type here is str | None, which doesn't make sense:
fromtypingimportAnydeff(x: Any) ->None:
ifxisnotNoneandxnotin ["x"]:
returnreveal_type(x) # "str | None"
The behavior was changed in ed0cd4a. The inferred type before this commit was Any, which seems reasonable.
The revealed type here is
str | None, which doesn't make sense:The behavior was changed in ed0cd4a. The inferred type before this commit was
Any, which seems reasonable.