mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
get_first_non_keyword_argument_values is not really used anymore
This commit is contained in:
@@ -265,20 +265,6 @@ def infer_atom(context, atom):
|
|||||||
@_limit_value_infers
|
@_limit_value_infers
|
||||||
def infer_expr_stmt(context, stmt, seek_name=None):
|
def infer_expr_stmt(context, stmt, seek_name=None):
|
||||||
with recursion.execution_allowed(context.inference_state, stmt) as allowed:
|
with recursion.execution_allowed(context.inference_state, stmt) as allowed:
|
||||||
# Here we allow list/set to recurse under certain conditions. To make
|
|
||||||
# it possible to resolve stuff like list(set(list(x))), this is
|
|
||||||
# necessary.
|
|
||||||
if not allowed and context.get_root_context().is_builtins_module():
|
|
||||||
try:
|
|
||||||
instance = context.arguments.instance
|
|
||||||
except AttributeError:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
if instance.name.string_name in ('list', 'set'):
|
|
||||||
c = instance.get_first_non_keyword_argument_values()
|
|
||||||
if instance not in c:
|
|
||||||
allowed = True
|
|
||||||
|
|
||||||
if allowed:
|
if allowed:
|
||||||
return _infer_expr_stmt(context, stmt, seek_name)
|
return _infer_expr_stmt(context, stmt, seek_name)
|
||||||
return NO_VALUES
|
return NO_VALUES
|
||||||
|
|||||||
@@ -130,13 +130,6 @@ class CompiledInstance(AbstractInstanceValue):
|
|||||||
def name(self):
|
def name(self):
|
||||||
return compiled.CompiledValueName(self, self.class_value.name.string_name)
|
return compiled.CompiledValueName(self, self.class_value.name.string_name)
|
||||||
|
|
||||||
def get_first_non_keyword_argument_values(self):
|
|
||||||
key, lazy_value = next(self.arguments.unpack(), ('', None))
|
|
||||||
if key is not None:
|
|
||||||
return NO_VALUES
|
|
||||||
|
|
||||||
return lazy_value.infer()
|
|
||||||
|
|
||||||
def is_stub(self):
|
def is_stub(self):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user