mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Get rid of py__package__ from contexts
This commit is contained in:
@@ -298,10 +298,6 @@ class ModuleContext(TreeContextMixin, ValueContext):
|
||||
def py__file__(self):
|
||||
return self._value.py__file__()
|
||||
|
||||
@property
|
||||
def py__package__(self):
|
||||
return self._value.py__package__
|
||||
|
||||
def is_package(self):
|
||||
return self._value.is_package
|
||||
|
||||
@@ -391,10 +387,6 @@ class CompiledModuleContext(CompiledContext):
|
||||
def py__file__(self):
|
||||
return self._value.py__file__()
|
||||
|
||||
@property
|
||||
def py__package__(self):
|
||||
return self._value.py__package__
|
||||
|
||||
def is_package(self):
|
||||
return self._value.is_package()
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ class Importer(object):
|
||||
self._fixed_sys_path = None
|
||||
self._infer_possible = True
|
||||
if level:
|
||||
base = module_context.py__package__()
|
||||
base = module_context.get_value().py__package__()
|
||||
# We need to care for two cases, the first one is if it's a valid
|
||||
# Python import. This import has a properly defined module name
|
||||
# chain like `foo.bar.baz` and an import in baz is made for
|
||||
@@ -553,7 +553,7 @@ def get_module_contexts_containing_name(inference_state, module_contexts, name):
|
||||
used_mod_paths.add(path)
|
||||
folders_with_names_to_be_checked.append((
|
||||
file_io.get_parent_folder(),
|
||||
module_context.py__package__()
|
||||
module_context.get_value().py__package__()
|
||||
))
|
||||
yield module_context
|
||||
|
||||
|
||||
Reference in New Issue
Block a user