-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix all mypy issues * Ran black * Exclude tox from mypy check * Fix all mypy issues again * Address PR comments * Fix accidental line ending changes * Update .gitignore * No unused type: ignore * TypeError: 'ABCMeta' object is not subscriptable * Fix RuffError * Fix post-merge mypy issues * RUff format * Ignore more generated files * Disable more mypy errors * Globally ignore attr-defined for now * Update more comments * Address PR comments and fix new exposed typing issues * Comments updates and don't touch vendored * Accidentally removed noqa * Update setuptools/tests/integration/test_pip_install_sdist.py Co-authored-by: Anderson Bravalheri <andersonbravalheri+github@gmail.com> * Post merge comments Update setuptools/tests/integration/test_pip_install_sdist.py Co-authored-by: Anderson Bravalheri <andersonbravalheri+github@gmail.com> * Document that usage of _config_vars is very purposeful Closes #4228 + try to resolve doc issue * sort nitpick_ignore * Make only comment on newline like others * Forgot to re-ignore --------- Co-authored-by: Anderson Bravalheri <andersonbravalheri+github@gmail.com>
- Loading branch information
1 parent
dbc6471
commit 226e1a2
Showing
28 changed files
with
164 additions
and
69 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 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 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.