setuptools icon indicating copy to clipboard operation
setuptools copied to clipboard

Re-enable mypy and sync mypy.ini from skeleton

Open Avasam opened this issue 1 year ago • 3 comments

Summary of changes

Ref https://github.com/jaraco/skeleton/issues/143

Pull Request Checklist

Avasam avatar Aug 27 '24 15:08 Avasam

The "Fix ConfigHandler generic" commit is related to https://github.com/python/mypy/issues/17631#issuecomment-2277491389 (same symptoms). Not sure why it wasn't failing before, didn't fail locally (granted I'm running from Windows on 3.9, so it could be environment-specific, despite version/platform flags), and only failed on the CI on (MacOS and/or 3.12)[^1].

But it still revealed an underlying misuse of the TypeVar

[^1]: No other MacOS or Python 3.12 action had time to complete, so idk which one was the specific cause.

Avasam avatar Aug 27 '24 16:08 Avasam

I still see some test failures.

_________________________ setuptools/config/expand.py __________________________
[gw3] linux -- Python 3.10.14 /home/runner/work/setuptools/setuptools/.tox/py/bin/python
206: error: "type: ignore" comment without error code (consider "type: ignore[union-attr]" instead)  [ignore-without-code]
291: error: "type: ignore" comment without error code (consider "type: ignore[assignment]" instead)  [ignore-without-code]
362: error: "type: ignore" comment without error code (consider "type: ignore[call-overload]" instead)  [ignore-without-code]
______________________ setuptools/config/pyprojecttoml.py ______________________
[gw3] linux -- Python 3.10.14 /home/runner/work/setuptools/setuptools/.tox/py/bin/python
48: error: "type: ignore" comment without error code (consider "type: ignore[union-attr]" instead)  [ignore-without-code]
__________________________ pkg_resources/__init__.py ___________________________
[gw0] linux -- Python 3.10.14 /home/runner/work/setuptools/setuptools/.tox/py/bin/python
2780: error: "type: ignore" comment without error code (consider "type: ignore[arg-type]" instead)  [ignore-without-code]
__________________ setuptools/tests/test_editable_install.py ___________________
[gw2] linux -- Python 3.10.14 /home/runner/work/setuptools/setuptools/.tox/py/bin/python
881: error: "type: ignore" comment without error code (consider "type: ignore[index]" instead)  [ignore-without-code]
883: error: "type: ignore" comment without error code (consider "type: ignore[index]" instead)  [ignore-without-code]
891: error: "type: ignore" comment without error code (consider "type: ignore[index]" instead)  [ignore-without-code]
892: error: "type: ignore" comment without error code (consider "type: ignore[index]" instead)  [ignore-without-code]

What's the plan for those?

Also, thanks for reconciling the differences between setuptools' and skeleton's mypy.ini.

jaraco avatar Aug 27 '24 18:08 jaraco

I still see some test failures. What's the plan for those?

I rebase and fix them 😃

Avasam avatar Aug 27 '24 18:08 Avasam

@jaraco Bump on this since currently static typing validation from mypy is disabled (at least pyright's running). And some of my pending PRs should be validated by it.

Avasam avatar Sep 26 '24 13:09 Avasam

Other PRs started failing too with a strange error (not the same though), so CI failure may or may not be related to these changes (although I don't see which of my changes could cause it)

Avasam avatar Sep 30 '24 19:09 Avasam

Now that the weird CI issue seems resolved. I'd like to merge this before bumping mypy to 1.12. And to unblock #4504

Avasam avatar Oct 15 '24 16:10 Avasam