pants icon indicating copy to clipboard operation
pants copied to clipboard

upgrade mypy to v1.10.1

Open tdyas opened this issue 1 year ago • 3 comments

Upgrade MyPy to v1.10.1.

tdyas avatar Jul 11 '24 15:07 tdyas

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?

cburroughs avatar Aug 21 '24 20:08 cburroughs

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

tdyas avatar Aug 21 '24 20:08 tdyas

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.

tdyas avatar Aug 22 '24 00:08 tdyas

Gave up on trying to solve the setuptools type stub issue, just ignored the applicable import from pkg_resources. This is ready for review.

tdyas avatar Sep 13 '24 21:09 tdyas

Merged in main. This is still ready for review. (This upgrades mypy for Pants itself.)

tdyas avatar Sep 19 '24 17:09 tdyas