You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Sync with decompyle3
This commit is contained in:
@@ -59,9 +59,9 @@ log_rounds = 5
|
||||
assert "05$" == f"{log_rounds:02d}$"
|
||||
|
||||
|
||||
def testit(a, b, l):
|
||||
# print(l)
|
||||
return l
|
||||
def testit(a, b, ll):
|
||||
# print(ll)
|
||||
return ll
|
||||
|
||||
|
||||
# The call below shows the need for BUILD_STRING to count expr arguments.
|
||||
@@ -102,11 +102,11 @@ assert f"x={x*y:{width}}" == "x=foofoo "
|
||||
# equivalent thing. For compatiblity with older Python we'll use "%"
|
||||
# instead of a format string
|
||||
def f():
|
||||
f"""Not a docstring"""
|
||||
f"""Not a docstring""" # noqa
|
||||
|
||||
|
||||
def g():
|
||||
"""Not a docstring""" f""
|
||||
"""Not a docstring""" f"" # noqa
|
||||
|
||||
|
||||
assert f.__doc__ is None
|
||||
@@ -129,3 +129,17 @@ assert f'{f"{0}"*3}' == "000"
|
||||
# The former, {{ confuses the format strings so dictionary/set comprehensions
|
||||
# don't work.
|
||||
assert f"expr={ {x: y for x, y in [(1, 2), ]}}" == "expr={1: 2}"
|
||||
|
||||
|
||||
class Line:
|
||||
def __init__(self, x, y):
|
||||
self.x = x
|
||||
self.y = y
|
||||
|
||||
# From 3.7 test_typing.py
|
||||
def __str__(self):
|
||||
return f"{self.x} -> {self.y}"
|
||||
|
||||
|
||||
line = Line(1, 2)
|
||||
assert str(line) == "1 -> 2"
|
||||
|
Reference in New Issue
Block a user