/opt/imh-python/lib/python3.9/site-packages/jedi/inference
NameSizeModeActions
compiled/-0755rm
gradual/-0755rm
value/-0755rm
__pycache__/-0755rm
analysis.py77630644editdlrm
arguments.py122180644editdlrm
base_value.py182190644editdlrm
cache.py41910644editdlrm
context.py171640644editdlrm
docstrings.py98240644editdlrm
docstring_utils.py7590644editdlrm
dynamic_params.py81540644editdlrm
filters.py124930644editdlrm
finder.py53260644editdlrm
flow_analysis.py45830644editdlrm
helpers.py59430644editdlrm
imports.py230820644editdlrm
lazy_value.py16670644editdlrm
names.py232140644editdlrm
param.py104500644editdlrm
parser_cache.py1910644editdlrm
recursion.py49320644editdlrm
references.py114070644editdlrm
signature.py48590644editdlrm
star_args.py78950644editdlrm
syntax_tree.py363190644editdlrm
sys_path.py102180644editdlrm
utils.py27060644editdlrm
__init__.py85050644editdlrm
Edit: /opt/imh-python/lib/python3.9/site-packages/jedi/inference/lazy_value.py (1667B)
from jedi.inference.base_value import ValueSet, NO_VALUES from jedi.common import monkeypatch class AbstractLazyValue: def __init__(self, data, min=1, max=1): self.data = data self.min = min self.max = max def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self.data) def infer(self): raise NotImplementedError class LazyKnownValue(AbstractLazyValue): """data is a Value.""" def infer(self): return ValueSet([self.data]) class LazyKnownValues(AbstractLazyValue): """data is a ValueSet.""" def infer(self): return self.data class LazyUnknownValue(AbstractLazyValue): def __init__(self, min=1, max=1): super().__init__(None, min, max) def infer(self): return NO_VALUES class LazyTreeValue(AbstractLazyValue): def __init__(self, context, node, min=1, max=1): super().__init__(node, min, max) self.context = context # We need to save the predefined names. It's an unfortunate side effect # that needs to be tracked otherwise results will be wrong. self._predefined_names = dict(context.predefined_names) def infer(self): with monkeypatch(self.context, 'predefined_names', self._predefined_names): return self.context.infer_node(self.data) def get_merged_lazy_value(lazy_values): if len(lazy_values) > 1: return MergedLazyValues(lazy_values) else: return lazy_values[0] class MergedLazyValues(AbstractLazyValue): """data is a list of lazy values.""" def infer(self): return ValueSet.from_sets(l.infer() for l in self.data)