The example below returns a boolean instead of a float. This passes mypy and shows no errors in the PyCharm editor.
def add(a: float, b: float) -> float:
return False
You can test this using the online mypy checker https://mypy-play.net/?mypy=latest&python=3.9&gist=92430212fc6c5e31b91f12154ef11998
How do I get mypy to complain here?