blob: c0c42b3083a6fee8355cf6f7fd1bb7beec27f66d [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,
))