Evaluation -> type inference

This commit is contained in:
Dave Halter
2019-08-13 01:29:50 +02:00
parent 467839a9ea
commit 4619552589
15 changed files with 34 additions and 46 deletions
+1 -4
View File
@@ -105,9 +105,6 @@ class FunctionMixin(object):
class FunctionContext(use_metaclass(CachedMetaClass, FunctionMixin, FunctionAndClassBase)):
"""
Needed because of decorators. Decorators are evaluated here.
"""
def is_function(self):
return True
@@ -178,7 +175,7 @@ class FunctionExecutionContext(TreeContext):
This is the most complicated class, because it contains the logic to
transfer parameters. It is even more complicated, because there may be
multiple calls to functions and recursion has to be avoided. But this is
responsibility of the decorators.
responsibility of the recursion module.
"""
function_execution_filter = FunctionExecutionFilter
+2 -2
View File
@@ -105,9 +105,9 @@ class AbstractInstanceContext(Context):
return names
return []
def execute_function_slots(self, names, *evaluated_args):
def execute_function_slots(self, names, *inferred_args):
return ContextSet.from_sets(
name.infer().execute_with_values(*evaluated_args)
name.infer().execute_with_values(*inferred_args)
for name in names
)
-4
View File
@@ -238,10 +238,6 @@ class ClassMixin(object):
class ClassContext(use_metaclass(CachedMetaClass, ClassMixin, FunctionAndClassBase)):
"""
This class is not only important to extend `tree.Class`, it is also a
important for descriptors (if the descriptor methods are evaluated or not).
"""
api_type = u'class'
@evaluator_method_cache()