blob: 02b8b0e0a1492d7755494e575ad8ca1cc4eb7c38 [file] [log] [blame] [edit]
# Test that single-line calls with no named arguments use the compact form.
# Single-line tuples are also okay.
str.rewrite(".", "/")
str.rewrite(
before = ".",
after = "/",
)
x = (1, 2, 3)
x = (1, "2", -3, [], {}, (), not b)
y = (
1,
[2],
)
y = (
1,
{2: 3},
)
y = (
1,
(2, 3),
)
y = (
1,
-(a + b),
)
y = (
1,
not (a or b),
)
x = (
1,
2,
3,
)
x = (
1,
2,
3,
4,
)
d.get(key, [])
myfunc(
1,
2,
foo(
x,
key = y,
),
)
myfunc(
1,
2,
foo(
x,
key = y,
),
)
myfunc(
1,
2,
foo(
x,
key = y,
),
)
myfunc(
1,
2,
foo(
x,
key = y,
),
)