github.com/cheshirekow/buildtools@v0.0.0-20200224190056-5d637702fe81/build/testdata/024.bzl.golden (about) 1 # Test that single-line calls with no named arguments use the compact form. 2 # Single-line tuples are also okay. 3 4 str.rewrite(".", "/") 5 str.rewrite(before = ".", after = "/") 6 7 x = (1, 2, 3) 8 x = (1, "2", -3, [], {}, (), not b) 9 10 y = (1, [2]) 11 y = (1, {2: 3}) 12 y = (1, (2, 3)) 13 y = (1, -(a + b)) 14 y = (1, not (a or b)) 15 16 x = ( 17 1, 18 2, 19 3, 20 ) 21 22 x = ( 23 1, 24 2, 25 3, 26 4, 27 ) 28 29 d.get(key, []) 30 31 myfunc(1, 2, foo(x, key = y)) 32 myfunc( 33 1, 34 2, 35 foo(x, key = y), 36 ) 37 myfunc( 38 1, 39 2, 40 foo(x, key = y), 41 ) 42 myfunc(1, 2, foo( 43 x, 44 key = y, 45 ))