Reporoducer:
from typing import reveal_type def f(x): return x def test(): x = f(42) or 1 reveal_type(x) # int | Unknown reveal_type(abs(x)) # int
This also reproduces when f is annotated to return Any.
f
Any
https://pyrefly.org/sandbox/?project=v2.I6HIRCtnoIlVo0LTCpZUKhDiIOs1IKmpAujwNA0TI00FYLwZgkSQTAJqRxdJTCoGimpihq-yQgBEQAHqVGDJAoyY9FJg-QUMcL2YPGVg0ZWqkFFSUlBspa8P055flK6fmqefkp9crI-iQ18BlJQSyxIzwaUiqnEK-eD0UAw0lpKIVYfEqzq-aFUHxSpQBd6YAgA
No response
Fixed all instances of unnecessary-type-conversion
Activity
Fixed all instances of unnecessary-type-conversion
Fixed all instances of unnecessary-type-conversion