diff --git a/test/bytecode_3.5/02_async_for.pyc b/test/bytecode_3.5/02_async_for.pyc index b2908f7d..fee1c418 100644 Binary files a/test/bytecode_3.5/02_async_for.pyc and b/test/bytecode_3.5/02_async_for.pyc differ diff --git a/test/bytecode_3.6/02_async_for.pyc b/test/bytecode_3.6/02_async_for.pyc index 857c1417..9434edd3 100644 Binary files a/test/bytecode_3.6/02_async_for.pyc and b/test/bytecode_3.6/02_async_for.pyc differ diff --git a/test/bytecode_3.7/02_async_for.pyc b/test/bytecode_3.7/02_async_for.pyc index 019a14cc..25866060 100644 Binary files a/test/bytecode_3.7/02_async_for.pyc and b/test/bytecode_3.7/02_async_for.pyc differ diff --git a/test/simple_source/bug35/02_async_for.py b/test/simple_source/bug35/02_async_for.py index 7b250d35..b8fbb1b3 100644 --- a/test/simple_source/bug35/02_async_for.py +++ b/test/simple_source/bug35/02_async_for.py @@ -1,3 +1,12 @@ async def a(b, c): async for b in c: pass + +# From 3.7 test_generators.py +# Bug was getting indentation correct for multiple async's +async def foo(X): + async for i in X: + pass + async for i in X: + pass + raise Done diff --git a/uncompyle6/semantics/customize36.py b/uncompyle6/semantics/customize36.py index d2c672be..cc123a66 100644 --- a/uncompyle6/semantics/customize36.py +++ b/uncompyle6/semantics/customize36.py @@ -56,7 +56,7 @@ def customize_for_version36(self, version): "unpack_list": ("*%c", (0, "list")), "tryfinally_return_stmt": ("%|try:\n%+%c%-%|finally:\n%+%|return%-\n\n", 1), "async_for_stmt36": ( - "%|async for %c in %c:\n%+%c%-%-\n\n", + "%|async for %c in %c:\n%+%c%-\n\n", (9, "store"), (1, "expr"), (18, "for_block"), diff --git a/uncompyle6/semantics/customize37.py b/uncompyle6/semantics/customize37.py index 09f96d8f..4a934d5a 100644 --- a/uncompyle6/semantics/customize37.py +++ b/uncompyle6/semantics/customize37.py @@ -55,14 +55,8 @@ def customize_for_version37(self, version): (1, "expr"), (17, "for_block"), ), - "async_for_stmt36": ( - "%|async for %c in %c:\n%+%c%-%-\n\n", - (9, "store"), - (1, "expr"), - (18, "for_block"), - ), "async_for_stmt37": ( - "%|async for %c in %c:\n%+%c%-%-\n\n", + "%|async for %c in %c:\n%+%c%-\n\n", (7, "store"), (1, "expr"), (16, "for_block"),