forked from VimPlug/jedi
infer_state -> inference_state
This commit is contained in:
@@ -33,9 +33,9 @@ from jedi.inference.gradual.conversion import convert_values
|
||||
|
||||
|
||||
class NameFinder(object):
|
||||
def __init__(self, infer_state, value, name_value, name_or_str,
|
||||
def __init__(self, inference_state, value, name_value, name_or_str,
|
||||
position=None, analysis_errors=True):
|
||||
self._infer_state = infer_state
|
||||
self._inference_state = inference_state
|
||||
# Make sure that it's not just a syntax tree node.
|
||||
self._value = value
|
||||
self._name_value = name_value
|
||||
@@ -113,7 +113,7 @@ class NameFinder(object):
|
||||
if lambdef is None or position < lambdef.children[-2].start_pos:
|
||||
position = ancestor.start_pos
|
||||
|
||||
return get_global_filters(self._infer_state, self._value, position, origin_scope)
|
||||
return get_global_filters(self._inference_state, self._value, position, origin_scope)
|
||||
|
||||
def get_value_filters(self):
|
||||
origin_scope = self._get_origin_scope()
|
||||
@@ -171,7 +171,7 @@ class NameFinder(object):
|
||||
def _check_getattr(self, inst):
|
||||
"""Checks for both __getattr__ and __getattribute__ methods"""
|
||||
# str is important, because it shouldn't be `Name`!
|
||||
name = compiled.create_simple_object(self._infer_state, self._string_name)
|
||||
name = compiled.create_simple_object(self._inference_state, self._string_name)
|
||||
|
||||
# This is a little bit special. `__getattribute__` is in Python
|
||||
# executed before `__getattr__`. But: I know no use case, where
|
||||
@@ -263,7 +263,7 @@ def _check_isinstance_type(value, element, search_name):
|
||||
|
||||
# arglist stuff
|
||||
arglist = trailer.children[1]
|
||||
args = TreeArguments(value.infer_state, value, arglist, trailer)
|
||||
args = TreeArguments(value.inference_state, value, arglist, trailer)
|
||||
param_list = list(args.unpack())
|
||||
# Disallow keyword arguments
|
||||
assert len(param_list) == 2
|
||||
@@ -273,7 +273,7 @@ def _check_isinstance_type(value, element, search_name):
|
||||
is_instance_call = helpers.call_of_leaf(lazy_value_object.data)
|
||||
# Do a simple get_code comparison. They should just have the same code,
|
||||
# and everything will be all right.
|
||||
normalize = value.infer_state.grammar._normalize
|
||||
normalize = value.inference_state.grammar._normalize
|
||||
assert normalize(is_instance_call) == normalize(call)
|
||||
except AssertionError:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user