Author: Raffael Tfirst <raffael.tfi...@gmail.com>
Branch: py3.5-async
Changeset: r85591:b52ebf4b8d02
Date: 2016-07-06 21:11 +0200
http://bitbucket.org/pypy/pypy/changeset/b52ebf4b8d02/

Log:    Change visit_annotations in symtable to have args and returns as
        parameters for async

diff --git a/pypy/interpreter/astcompiler/symtable.py 
b/pypy/interpreter/astcompiler/symtable.py
--- a/pypy/interpreter/astcompiler/symtable.py
+++ b/pypy/interpreter/astcompiler/symtable.py
@@ -366,7 +366,7 @@
         assert isinstance(args, ast.arguments)
         self.visit_sequence(args.defaults)
         self.visit_kwonlydefaults(args.kw_defaults)
-        self._visit_annotations(func)
+        self._visit_annotations(func, func.args, func.returns)
         self.visit_sequence(func.decorator_list)
         new_scope = FunctionScope(func.name, func.lineno, func.col_offset)
         self.push_scope(new_scope, func)
@@ -527,14 +527,13 @@
             arg = params[i].arg
             self.note_symbol(arg, SYM_PARAM)
 
-    def _visit_annotations(self, func):
-        args = func.args
+    def _visit_annotations(self, func, args, returns):
         assert isinstance(args, ast.arguments)
         if args.args:
             self._visit_arg_annotations(args.args)
         if args.kwonlyargs:
             self._visit_arg_annotations(args.kwonlyargs)
-        if func.returns:
+        if returns:
             func.returns.walkabout(self)
 
     def _visit_arg_annotations(self, args):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to