File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 5
5
strict = False
6
6
7
7
# Early opt-in even when strict = False
8
- warn_unused_ignores = True
8
+ # warn_unused_ignores = True # Disabled until we have distutils stubs for Python 3.12+
9
9
warn_redundant_casts = True
10
10
enable_error_code = ignore-without-code
11
11
@@ -34,12 +34,14 @@ exclude = (?x)(
34
34
# Duplicate module name
35
35
| ^pkg_resources/tests/data/my-test-package-source/setup.py$
36
36
)
37
-
38
- # DistributionMetadata.license_files and DistributionMetadata.license_file
39
- # are dynamically patched in setuptools/_core_metadata.py
40
- # and no DistributionMetadata subclass exists in setuptools
41
37
[mypy-setuptools.*]
42
- disable_error_code = attr-defined
38
+ disable_error_code =
39
+ # DistributionMetadata.license_files and DistributionMetadata.license_file
40
+ # are dynamically patched in setuptools/_core_metadata.py
41
+ # and no DistributionMetadata subclass exists in setuptools
42
+ attr-defined,
43
+ # See issue described below about distutils across Python versions
44
+ has-type,
43
45
44
46
# - pkg_resources tests create modules that won't exists statically before the test is run.
45
47
# Let's ignore all "import-not-found" since, if an import really wasn't found, then the test would fail.
Original file line number Diff line number Diff line change 30
30
BaseError = _distutils_errors .DistutilsError
31
31
32
32
33
- class InvalidConfigError (OptionError ):
33
+ class InvalidConfigError (OptionError ): # type: ignore[valid-type, misc] # distutils imports are `Any` on python 3.12+
34
34
"""Error used for invalid configurations."""
35
35
36
36
37
- class RemovedConfigError (OptionError ):
37
+ class RemovedConfigError (OptionError ): # type: ignore[valid-type, misc] # distutils imports are `Any` on python 3.12+
38
38
"""Error used for configurations that were deprecated and removed."""
39
39
40
40
41
- class RemovedCommandError (BaseError , RuntimeError ):
41
+ class RemovedCommandError (BaseError , RuntimeError ): # type: ignore[valid-type, misc] # distutils imports are `Any` on python 3.12+
42
42
"""Error used for commands that have been removed in setuptools.
43
43
44
44
Since ``setuptools`` is built on ``distutils``, simply removing a command
@@ -48,7 +48,7 @@ class RemovedCommandError(BaseError, RuntimeError):
48
48
"""
49
49
50
50
51
- class PackageDiscoveryError (BaseError , RuntimeError ):
51
+ class PackageDiscoveryError (BaseError , RuntimeError ): # type: ignore[valid-type, misc] # distutils imports are `Any` on python 3.12+
52
52
"""Impossible to perform automatic discovery of packages and/or modules.
53
53
54
54
The current project layout or given discovery options can lead to problems when
You can’t perform that action at this time.
0 commit comments