mypy type fix (for real)

This commit is contained in:
thomashacker 2023-02-06 13:26:50 +01:00
parent 63cffa6b86
commit f0ad4815cc

View File

@ -243,16 +243,16 @@ def get_third_party_dependencies(
for func_name in func_names:
# Try the lang-specific version and fall back
try:
func_info = util.registry.find(reg_name, lang + "." + func_name) # type: ignore
func_info = util.registry.find(reg_name, lang + "." + func_name)
except RegistryError:
try:
func_info = util.registry.find(reg_name, func_name) # type: ignore
func_info = util.registry.find(reg_name, func_name)
except RegistryError as regerr:
# lang-specific version being absent is not actually an issue
raise regerr from None
module_name = func_info.get("module") # type: ignore[attr-defined]
if module_name: # the code is part of a module, not a --code file
modules.add(func_info["module"].split(".")[0]) # type: ignore[index]
modules.add(func_info["module"].split(".")[0]) # type: ignore
dependencies = []
for module_name in modules:
if module_name in distributions: