Summary
main.py
def fn(value: bool):
a: int # hint: `a` is unused
if value:
a = 1
else:
a = 2
return a
this is a common pattern if you want to explicitly declare the type before assignment if it's assigned in multiple possible spots. this declaration is not an assignment so it should not be considered unused
Version
No response
Summary
Playground
main.pythis is a common pattern if you want to explicitly declare the type before assignment if it's assigned in multiple possible spots. this declaration is not an assignment so it should not be considered unused
Version
No response