Make is_package a function and call it consistently

This commit is contained in:
Dave Halter
2019-12-01 19:31:31 +01:00
parent 6ffeea7eea
commit 8a26a23884
7 changed files with 19 additions and 10 deletions
+1 -1
View File
@@ -235,7 +235,7 @@ def _load_from_typeshed(inference_state, python_value_set, parent_module_value,
map_ = _cache_stub_file_map(inference_state.grammar.version_info)
import_name = _IMPORT_MAP.get(import_name, import_name)
elif isinstance(parent_module_value, ModuleValue):
if not parent_module_value.is_package:
if not parent_module_value.is_package():
# Only if it's a package (= a folder) something can be
# imported.
return None