Some background information: I am using mypy_protobuf package. For the type checking purpose it generates .pyi files, and for every enum wrapper Xxx in module mmm it will generate type mmm.XxxValue. So I have a function.
def aaa(aaa: mmm.XxxValue) -> None:
It passes mypy checks. When I start the program execution, on importing the module python3 raises AttributeError because mmm does not have XxxValue, this is right but I would expect that python3 executable would simply ignore annotations.