Check that called function returns a value [func-returns-value]

Mypy reports an error if you call a function with a Nonereturn type and don’t ignore the return value, as this isusually (but not always) a programming error.

In this example, the if f() check is always false since freturns None:

  1. def f() -> None:
  2. ...
  3.  
  4. # OK: we don't do anything with the return value
  5. f()
  6.  
  7. # Error: "f" does not return a value [func-returns-value]
  8. if f():
  9. print("not false")