-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix all mypy issues #3979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Fix all mypy issues #3979
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
aaea47d
Fix all mypy issues
Avasam 11fd06c
Ran black
Avasam 8050560
Exclude tox from mypy check
Avasam 765881a
Merge branch 'main' of https://github.com/pypa/setuptools into fix-al…
Avasam ddbf028
Fix all mypy issues again
Avasam 5f287b8
Merge branch 'main' into fix-all-mypy-issues
Avasam 37a2bb1
Address PR comments
Avasam f0e6bc5
Merge branch 'fix-all-mypy-issues' of https://github.com/Avasam/setup…
Avasam 03afa45
Fix accidental line ending changes
Avasam dc946aa
Update .gitignore
Avasam f69eaa1
Merge branch 'main' of https://github.com/pypa/setuptools into fix-al…
Avasam f0697b4
No unused type: ignore
Avasam baa555b
TypeError: 'ABCMeta' object is not subscriptable
Avasam c367b9f
Fix RuffError
Avasam c7ed433
Merge branch 'main' into fix-all-mypy-issues
Avasam ebdabe4
Merge branch 'main' into fix-all-mypy-issues
Avasam 82265ca
Merge branch 'main' of https://github.com/pypa/setuptools into fix-al…
Avasam 7ddd2b2
Merge branch 'fix-all-mypy-issues' of https://github.com/Avasam/setup…
Avasam 84bd5e3
Merge branch 'main' of https://github.com/pypa/setuptools into fix-al…
Avasam f76def7
Fix post-merge mypy issues
Avasam ace61b4
Merge branch 'main' into fix-all-mypy-issues
Avasam d114d18
Merge branch 'main' of https://github.com/pypa/setuptools into fix-al…
Avasam 818b206
Merge branch 'fix-all-mypy-issues' of https://github.com/Avasam/setup…
Avasam 3ed0dda
Merge branch 'main' into fix-all-mypy-issues
Avasam 024e30e
Merge branch 'main' of https://github.com/pypa/setuptools into fix-al…
Avasam 8fbe1bf
RUff format
Avasam c4dd3c9
Merge branch 'fix-all-mypy-issues' of https://github.com/Avasam/setup…
Avasam 83c2b3d
Ignore more generated files
Avasam f4e1d21
Disable more mypy errors
Avasam 6b5bbca
Globally ignore attr-defined for now
Avasam ecac670
Update more comments
Avasam f3779b1
Address PR comments and fix new exposed typing issues
Avasam 379a041
Comments updates and don't touch vendored
Avasam 555e9ff
Accidentally removed noqa
Avasam 8aa568a
Update setuptools/tests/integration/test_pip_install_sdist.py
Avasam 62a8099
Merge branch 'main' of https://github.com/pypa/setuptools into fix-al…
Avasam b3fde45
Post merge comments
Avasam 8981ed4
Merge branch 'fix-all-mypy-issues' of https://github.com/Avasam/setup…
Avasam 55eeabd
Document that usage of _config_vars is very purposeful Closes #4228
Avasam e9d79f0
sort nitpick_ignore
Avasam 232bcd4
Make only comment on newline like others
Avasam 7ba7133
Merge branch 'main' of https://github.com/pypa/setuptools into fix-al…
Avasam 708fff7
Forgot to re-ignore
Avasam e1c064f
Merge branch 'main' of https://github.com/pypa/setuptools into fix-al…
Avasam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,42 @@ | ||
[mypy] | ||
ignore_missing_imports = True | ||
# required to support namespace packages | ||
# https://github.com/python/mypy/issues/14057 | ||
# CI should test for all versions, local development gets hints for oldest supported | ||
python_version = 3.8 | ||
strict = False | ||
warn_unused_ignores = True | ||
# required to support namespace packages: https://github.com/python/mypy/issues/14057 | ||
explicit_package_bases = True | ||
exclude = (?x)( | ||
^build/ | ||
| ^.tox/ | ||
| ^pkg_resources/tests/data/my-test-package-source/setup.py$ # Duplicate module name | ||
| ^.+?/(_vendor|extern)/ # Vendored | ||
| ^setuptools/_distutils/ # Vendored | ||
| ^setuptools/config/_validate_pyproject/ # Auto-generated | ||
) | ||
disable_error_code = | ||
# TODO: Test environment is not yet properly configured to install all imported packages | ||
# import-not-found, # This can be left commented out for local runs until we enforce running mypy in the CI | ||
# TODO: Not all dependencies are typed. Namely: distutils._modified, wheel.wheelfile, and jaraco.* | ||
import-untyped, | ||
# Ignoring attr-defined because setuptools wraps a lot of distutils classes, adding new attributes, | ||
# w/o updating all the attributes and return types from the base classes for type-checkers to understand | ||
# Especially with setuptools.dist.command vs distutils.dist.command vs setuptools._distutils.dist.command | ||
# *.extern modules that actually live in *._vendor will also cause attr-defined issues on import | ||
attr-defined, | ||
|
||
# Avoid raising issues when importing from "extern" modules, as those are added to path dynamically. | ||
# https://github.com/pypa/setuptools/pull/3979#discussion_r1367968993 | ||
[mypy-pkg_resources.extern.*,setuptools.extern.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-pkg_resources.tests.*,setuptools.tests.*] | ||
disable_error_code = | ||
# Tests include creating dynamic modules that won't exists statically before the test is run. | ||
# Let's ignore all "import-not-found", as if an import really wasn't found, then the test would fail. | ||
import-not-found, | ||
# mmany untyped "jaraco" modules | ||
import-untyped, | ||
|
||
# Mypy issue, this vendored module is already excluded! | ||
[mypy-setuptools._vendor.packaging._manylinux] | ||
disable_error_code = import-not-found |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.