this can be made prohibited by MyPy's --strict flag [1], and enforced with a mypy git pre-commit hook locally, and with a MyPy CI job.
[1] https://mypy.readthedocs.io/en/stable/command_line.html#cmdo...
Running a type checker in Python is a way to avoid runtime type errors, just like in compiled languages, but without a performance benefit.