You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Bug in "async for" indentation
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,12 @@
|
|||||||
async def a(b, c):
|
async def a(b, c):
|
||||||
async for b in c:
|
async for b in c:
|
||||||
pass
|
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
|
||||||
|
@@ -56,7 +56,7 @@ def customize_for_version36(self, version):
|
|||||||
"unpack_list": ("*%c", (0, "list")),
|
"unpack_list": ("*%c", (0, "list")),
|
||||||
"tryfinally_return_stmt": ("%|try:\n%+%c%-%|finally:\n%+%|return%-\n\n", 1),
|
"tryfinally_return_stmt": ("%|try:\n%+%c%-%|finally:\n%+%|return%-\n\n", 1),
|
||||||
"async_for_stmt36": (
|
"async_for_stmt36": (
|
||||||
"%|async for %c in %c:\n%+%c%-%-\n\n",
|
"%|async for %c in %c:\n%+%c%-\n\n",
|
||||||
(9, "store"),
|
(9, "store"),
|
||||||
(1, "expr"),
|
(1, "expr"),
|
||||||
(18, "for_block"),
|
(18, "for_block"),
|
||||||
|
@@ -55,14 +55,8 @@ def customize_for_version37(self, version):
|
|||||||
(1, "expr"),
|
(1, "expr"),
|
||||||
(17, "for_block"),
|
(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_stmt37": (
|
||||||
"%|async for %c in %c:\n%+%c%-%-\n\n",
|
"%|async for %c in %c:\n%+%c%-\n\n",
|
||||||
(7, "store"),
|
(7, "store"),
|
||||||
(1, "expr"),
|
(1, "expr"),
|
||||||
(16, "for_block"),
|
(16, "for_block"),
|
||||||
|
Reference in New Issue
Block a user