It would be useful to have the option to show an error when a function's non-None returned value is not used. For example in this code:
def greeting(name: str) -> str:
return f"Hi {name}"
def greet(name: str) -> None:
greeting(name)
I would like to get an error on the call to greeting inside of greet because a value is returned but unused. If a returned value is meant to be ignored it would expressed explicitly with _ = greeting(name) or _unused_greeting = greeting(name).
It would be useful to have the option to show an error when a function's non-
Nonereturned value is not used. For example in this code:I would like to get an error on the call to
greetinginside ofgreetbecause a value is returned but unused. If a returned value is meant to be ignored it would expressed explicitly with_ = greeting(name)or_unused_greeting = greeting(name).