Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Tools/peg_generator/mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,3 @@ enable_error_code = truthy-bool,ignore-without-code
# except for a few settings that can't yet be enabled:
warn_return_any = False
warn_unreachable = False

[mypy-pegen.build]
# we need this for now due to some missing annotations
# in typeshed's stubs for setuptools
disallow_untyped_calls = False
9 changes: 4 additions & 5 deletions Tools/peg_generator/pegen/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ def compile_c_extension(
cmd.include_dirs = include_dirs
if build_dir:
cmd.build_temp = build_dir
# A deficiency in typeshed's stubs means we have to type: ignore:
cmd.ensure_finalized() # type: ignore[attr-defined]
cmd.ensure_finalized()

compiler = new_compiler()
customize_compiler(compiler)
Expand All @@ -160,8 +159,8 @@ def compile_c_extension(
library_filename = compiler.library_filename(extension_name, output_dir=library_dir)
if newer_group(common_sources, library_filename, "newer"):
if sys.platform == "win32":
# A deficiency in typeshed's stubs means we have to type: ignore:
pdb = compiler.static_lib_format % (extension_name, ".pdb") # type: ignore[attr-defined]
assert compiler.static_lib_format
pdb = compiler.static_lib_format % (extension_name, ".pdb")
compile_opts = [f"/Fd{library_dir}\\{pdb}"]
compile_opts.extend(extra_compile_args)
else:
Expand Down Expand Up @@ -213,7 +212,7 @@ def compile_c_extension(
ext_path,
libraries=cmd.get_libraries(extension),
extra_postargs=extra_link_args,
export_symbols=cmd.get_export_symbols(extension),
export_symbols=cmd.get_export_symbols(extension), # type: ignore[no-untyped-call]
debug=cmd.debug,
build_temp=cmd.build_temp,
)
Expand Down
2 changes: 1 addition & 1 deletion Tools/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ mypy==1.5.1

# needed for peg_generator:
types-psutil==5.9.5.16
types-setuptools==68.1.0.0
types-setuptools==68.1.0.1