You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
"async for"s can has pass blocks
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2019-2020 by Rocky Bernstein
|
||||
# Copyright (c) 2019-2020, 2022 by Rocky Bernstein
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -41,7 +41,7 @@ def customize_for_version35(self, version):
|
||||
"%|async for %c in %c:\n%+%|%c%-\n\n",
|
||||
(9, "store"),
|
||||
(1, "expr"),
|
||||
(25, "for_block"),
|
||||
(25, ("for_block", "pass")),
|
||||
),
|
||||
"async_forelse_stmt": (
|
||||
"%|async for %c in %c:\n%+%c%-%|else:\n%+%c%-\n\n",
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2019-2021 by Rocky Bernstein
|
||||
# Copyright (c) 2019-2022 by Rocky Bernstein
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -61,7 +61,8 @@ def customize_for_version36(self, version):
|
||||
"%|async for %c in %c:\n%+%c%-\n\n",
|
||||
(9, "store"),
|
||||
(1, "expr"),
|
||||
(-9, "for_block"), # Count from end, since COME_FROM shifts things in the forward direction
|
||||
# Count from end, since COME_FROM shifts things in the forward direction
|
||||
(-9, ("for_block", "pass")),
|
||||
),
|
||||
"async_forelse_stmt36": (
|
||||
"%|async for %c in %c:\n%+%c%-%|else:\n%+%c%-\n\n",
|
||||
|
@@ -68,7 +68,7 @@ def customize_for_version37(self, version):
|
||||
"%|async for %c in %c:\n%+%c%-\n\n",
|
||||
(8, "store"),
|
||||
(1, "expr"),
|
||||
(17, "for_block"),
|
||||
(17, ("for_block", "pass")),
|
||||
),
|
||||
"async_with_stmt": ("%|async with %c:\n%+%c%-", (0, "expr"), 3),
|
||||
"async_with_as_stmt": (
|
||||
|
@@ -36,7 +36,7 @@ def customize_for_version38(self, version):
|
||||
"%|async for %c in %c:\n%+%c%-%-\n\n",
|
||||
(2, "store"),
|
||||
(0, "expr"),
|
||||
(3, "for_block"),
|
||||
(3, ("for_block", "pass")),
|
||||
),
|
||||
"async_forelse_stmt38": (
|
||||
"%|async for %c in %c:\n%+%c%-%|else:\n%+%c%-\n\n",
|
||||
|
Reference in New Issue
Block a user