pypa / setuptools

Official project repository for the Setuptools build system
https://pypi.org/project/setuptools/
MIT License
2.36k stars 1.15k forks source link

Merge and update variable and params annotations from typeshed #4246

Closed Avasam closed 3 weeks ago

Avasam commented 3 months ago

Summary of changes

Merge and update (because they were not all correct or exact) variable and params annotations from typeshed. Missing public annotations are missing from typeshed too. This PR purposefully avoids adding TypeVars, overloads and return types. Those will all be tackled in a follow-up PR. Return types are inferred at this step.

Step 3.1 of https://github.com/pypa/setuptools/issues/2345#issuecomment-1627561833 but only for pkg_resources

Pull Request Checklist

[PR docs]: https://setuptools.pypa.io/en/latest/development/developer-guide.html#making-a-pull-request

Avasam commented 1 month ago

As draft until https://github.com/pypa/setuptools/pull/4262 and https://github.com/pypa/setuptools/pull/4267 are completed

Avasam commented 3 weeks ago

@abravalheri in-code comments have been updated to reflect that fixes have been done upstream. I don't think we need to wait for the next mypy release. type-ignore can be removed when updating to mypy 1.11

abravalheri commented 3 weeks ago

Thank you very much.