File tree Expand file tree Collapse file tree 4 files changed +13
-8
lines changed Expand file tree Collapse file tree 4 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ disable_error_code =
18
18
19
19
# # local
20
20
21
+ # Use our custom stubs for distutils
22
+ mypy_path = $MYPY_CONFIG_FILE_DIR/typings
23
+
21
24
# CI should test for all versions, local development gets hints for oldest supported
22
25
# But our testing setup doesn't allow passing CLI arguments, so local devs have to set this manually.
23
26
# python_version = 3.8
@@ -48,17 +51,10 @@ disable_error_code =
48
51
[mypy-pkg_resources.tests.*]
49
52
disable_error_code = import-not-found
50
53
51
- # - distutils doesn't exist on Python 3.12, unfortunately, this means typing
52
- # will be missing for subclasses of distutils on Python 3.12 until either:
53
- # - support for `SETUPTOOLS_USE_DISTUTILS=stdlib` is dropped (#3625)
54
- # for setuptools to import `_distutils` directly
55
- # - or non-stdlib distutils typings are exposed
56
- [mypy-distutils.*]
57
- ignore_missing_imports = True
58
-
59
54
# - wheel: does not intend on exposing a programmatic API https://github.com/pypa/wheel/pull/610#issuecomment-2081687671
60
55
[mypy-wheel.*]
61
56
ignore_missing_imports = True
57
+
62
58
# - The following are not marked as py.typed:
63
59
# - jaraco: Since mypy 1.12, the root name of the untyped namespace package gets called-out too
64
60
# - jaraco.develop: https://github.com/jaraco/jaraco.develop/issues/22
Original file line number Diff line number Diff line change @@ -133,6 +133,8 @@ type = [
133
133
134
134
# local
135
135
136
+ # Referenced in distutils-stubs
137
+ " types-docutils" ,
136
138
# pin mypy version so a new version doesn't suddenly cause the CI to fail,
137
139
# until types-setuptools is removed from typeshed.
138
140
# For help with static-typing issues, or mypy update, ping @Avasam
@@ -203,6 +205,8 @@ include-package-data = true
203
205
include = [
204
206
" setuptools*" ,
205
207
" pkg_resources*" ,
208
+ # TODO: Include distutils stubs with package once we're confident in them
209
+ # "typings/distutils-stubs",
206
210
" _distutils_hack*" ,
207
211
]
208
212
exclude = [
Original file line number Diff line number Diff line change 12
12
],
13
13
// Our testing setup doesn't allow passing CLI arguments, so local devs have to set this manually.
14
14
// "pythonVersion": "3.8",
15
+ // Allow using distutils-stubs on Python 3.12+
16
+ "reportMissingModuleSource" : false ,
15
17
// For now we don't mind if mypy's `type: ignore` comments accidentally suppresses pyright issues
16
18
"enableTypeIgnoreComments" : true ,
17
19
"typeCheckingMode" : " basic" ,
Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ ignore = [
34
34
# Only enforcing return type annotations for public functions
35
35
" ANN202" , # missing-return-type-private-function
36
36
" ANN204" , # missing-return-type-special-method
37
+ # Typeshed doesn't want complex or non-literal defaults for maintenance and testing reasons.
38
+ # This doesn't affect us, let's have more complete stubs.
39
+ " PYI011" , # typed-argument-default-in-stub
37
40
38
41
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
39
42
" W191" ,
You can’t perform that action at this time.
0 commit comments