X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/4ebf14d17ed544be893be5706c02116fd8b83b4c..27932494bcefac03497dd92dcf0c59a04c10d757:/tests/data/preview/skip_magic_trailing_comma.py diff --git a/tests/data/preview/skip_magic_trailing_comma.py b/tests/data/preview/skip_magic_trailing_comma.py index e98174a..c020db7 100644 --- a/tests/data/preview/skip_magic_trailing_comma.py +++ b/tests/data/preview/skip_magic_trailing_comma.py @@ -15,6 +15,37 @@ set_of_types = {tuple[int,],} # Except single element tuples small_tuple = (1,) +# Trailing commas in multiple chained non-nested parens. +zero( + one, +).two( + three, +).four( + five, +) + +func1(arg1).func2(arg2,).func3(arg3).func4(arg4,).func5(arg5) + +( + a, + b, + c, + d, +) = func1( + arg1 +) and func2(arg2) + +func( + argument1, + ( + one, + two, + ), + argument4, + argument5, + argument6, +) + # output # We should not remove the trailing comma in a single-element subscript. a: tuple[int,] @@ -32,3 +63,12 @@ set_of_types = {tuple[int,]} # Except single element tuples small_tuple = (1,) + +# Trailing commas in multiple chained non-nested parens. +zero(one).two(three).four(five) + +func1(arg1).func2(arg2).func3(arg3).func4(arg4).func5(arg5) + +(a, b, c, d) = func1(arg1) and func2(arg2) + +func(argument1, (one, two), argument4, argument5, argument6)