Skip to content

Commit b89b838

Browse files
authored
gh-108455: peg_generator: use types-setuptools==68.1.0.1 in CI (#108697)
1 parent 991e4e7 commit b89b838

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

Tools/peg_generator/mypy.ini

-5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,3 @@ enable_error_code = truthy-bool,ignore-without-code
1313
# except for a few settings that can't yet be enabled:
1414
warn_return_any = False
1515
warn_unreachable = False
16-
17-
[mypy-pegen.build]
18-
# we need this for now due to some missing annotations
19-
# in typeshed's stubs for setuptools
20-
disallow_untyped_calls = False

Tools/peg_generator/pegen/build.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ def compile_c_extension(
148148
cmd.include_dirs = include_dirs
149149
if build_dir:
150150
cmd.build_temp = build_dir
151-
# A deficiency in typeshed's stubs means we have to type: ignore:
152-
cmd.ensure_finalized() # type: ignore[attr-defined]
151+
cmd.ensure_finalized()
153152

154153
compiler = new_compiler()
155154
customize_compiler(compiler)
@@ -160,8 +159,8 @@ def compile_c_extension(
160159
library_filename = compiler.library_filename(extension_name, output_dir=library_dir)
161160
if newer_group(common_sources, library_filename, "newer"):
162161
if sys.platform == "win32":
163-
# A deficiency in typeshed's stubs means we have to type: ignore:
164-
pdb = compiler.static_lib_format % (extension_name, ".pdb") # type: ignore[attr-defined]
162+
assert compiler.static_lib_format
163+
pdb = compiler.static_lib_format % (extension_name, ".pdb")
165164
compile_opts = [f"/Fd{library_dir}\\{pdb}"]
166165
compile_opts.extend(extra_compile_args)
167166
else:
@@ -213,7 +212,7 @@ def compile_c_extension(
213212
ext_path,
214213
libraries=cmd.get_libraries(extension),
215214
extra_postargs=extra_link_args,
216-
export_symbols=cmd.get_export_symbols(extension),
215+
export_symbols=cmd.get_export_symbols(extension), # type: ignore[no-untyped-call]
217216
debug=cmd.debug,
218217
build_temp=cmd.build_temp,
219218
)

Tools/requirements-dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ mypy==1.5.1
44

55
# needed for peg_generator:
66
types-psutil==5.9.5.16
7-
types-setuptools==68.1.0.0
7+
types-setuptools==68.1.0.1

0 commit comments

Comments
 (0)