I'm the maintainer of pypdf. We use a CI that currently checks mypy for Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12.
I am thinking about just running mypy for one Python version.
Does mypy in a fixed version x behave the same for all Python versions (we do have pytest covering the code; meaning if we import stuff that is not available in one version pytest will fail).
from __future__ import annotations.enum.memberwill be error below 3.10, andcollections.Sequenceorimport formatterwill be error on and above 3.10.mypyis aware of python internal and stdlib changes and analyses your code accordingly.