Fix default parameters name resolution

This commit is contained in:
Dave Halter committed 2018-08-27 23:10:23 +02:00
1 parent 7b896ae5d0
commit 7c8051feab
3 files changed
+43 -7

No files matched your search

+5
View File
@@ -192,6 +192,11 @@ class FunctionExecutionContext(TreeContext):
break
return context_set
def get_default_param_context(self):
if isinstance(self.function_context, MethodContext):
return self.function_context.class_context
return self.parent_context
def _get_yield_lazy_context(self, yield_expr):
if yield_expr.type == 'keyword':
# `yield` just yields None.