I have the two files in the following directory structure - . ├── mymod.py └── mymod.pyi The files are as follows - def add(a, b): return a + b if __name__ == "__main__": add(None, None) from typing import ( Union, ) def add(a: Union[int, str], b: Union[int, str]) -> Union[int, str]: ... I do not have any environment variables or config for stub files. The mypy cache is also cleared. When I run mypy mymod.py why does it not generate any errors? Continue reading...