Re-enable mypy and sync mypy.ini from skeleton
Summary of changes
Ref https://github.com/jaraco/skeleton/issues/143
Pull Request Checklist
- [ ] Changes have tests
- [ ] News fragment added in
newsfragments/. (See documentation for details)
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.
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.
I still see some test failures. What's the plan for those?
I rebase and fix them 😃
@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.
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)
Now that the weird CI issue seems resolved. I'd like to merge this before bumping mypy to 1.12. And to unblock #4504