Implement flag to allow typechecking of untyped modules by DeinAlptraum · Pull Request #17712 · python/mypy
I tried this flag for Home Assistant today. Unfortunately, mypy couldn't even do a full run and failed instantly. Haven't narrowed it down completely yet, just a first reproducer (tested with Python 3.13):
# test.py import aprslib.base91 reveal_type(1)
# mypy_config.ini [mypy] follow_imports = normal follow_untyped_imports = true
pip install aprslib==0.7.2 mypy --config-file mypy_config.ini test.py
/.../venv/lib/python3.13/site-packages/aprslib/parsing/common.py:218: SyntaxWarning: invalid escape sequence '\!' match = re.findall("^(.*)\!([\x21-\x7b])([\x20-\x7b]{2})\!(.*?)$", body) venv/lib/python3.13/site-packages/aprslib/parsing/__init__.py: error: Source file found twice under different module names: "aprslib.parsing" and "aprslib.parsing.__init__" Found 1 error in 1 file (errors prevented further checking)
The SyntaxWarning is an unrelated issue.
Will open a new issue, once I've narrowed it down a bit more.