upgrade mypy to v1.10.1
Upgrade MyPy to v1.10.1.
I know reports indicate this doesn't fully fix #18519, but I don't think there is any reason not to do this upgrade. Anything todo before un-drafting?
I know reports indicate this doesn't fully fix #18519, but I don't think there is any reason not to do this upgrade. Anything todo before un-drafting?
Still need to cleanup unused type comments as per this build failure: https://github.com/pantsbuild/pants/actions/runs/9894141143/job/27331097301?pr=21158
And still not understanding why inclusion of types-setuptools does not fix this error:
src/python/pants/util/pip_requirement.py:10:1: error: Library stubs not installed for "pkg_resources.extern.packaging.requirements" [import-untyped]
from pkg_resources.extern.packaging.requirements import (
^
src/python/pants/util/pip_requirement.py:10:1: note: Hint: "python3 -m pip install types-setuptools"
src/python/pants/util/pip_requirement.py:10:1: note: (or run "mypy --install-types" to install all missing stub packages)
src/python/pants/util/pip_requirement.py:10:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 1 source file)
But I haven't tracked whether types-setuptools actually has the requisite type stubs.
Gave up on trying to solve the setuptools type stub issue, just ignored the applicable import from pkg_resources. This is ready for review.
Merged in main. This is still ready for review. (This upgrades mypy for Pants itself.)