get_first_non_keyword_argument_values is not really used anymore

This commit is contained in:
Dave Halter
2019-09-04 00:08:49 +02:00
parent 0be9ab0caf
commit b27f47683c
2 changed files with 0 additions and 21 deletions

View File

@@ -265,20 +265,6 @@ def infer_atom(context, atom):
@_limit_value_infers
def infer_expr_stmt(context, stmt, seek_name=None):
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:
return _infer_expr_stmt(context, stmt, seek_name)
return NO_VALUES

View File

@@ -130,13 +130,6 @@ class CompiledInstance(AbstractInstanceValue):
def name(self):
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):
return False