Types function returns None or bool

-> bool means the function returns a boolean. Either True or False.

-> None means the function returns None. Explicitely, or implicitely.

def f() -> bool:
    return True

def g() -> None:
    return True

def h() -> None:
    return None

def x() -> None:

def z() -> None:

function_bool.py:5: error: No return value expected
Found 1 error in 1 file (checked 1 source file)