X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/882d8795c6ff65c02f2657e596391748d1b6b7f5:/tests/data/cases/skip_magic_trailing_comma.py..HEAD:/.vim/bundle/black/tests/data/cases/static/git-favicon.png diff --git a/tests/data/cases/skip_magic_trailing_comma.py b/tests/data/cases/skip_magic_trailing_comma.py deleted file mode 100644 index 4dda5df..0000000 --- a/tests/data/cases/skip_magic_trailing_comma.py +++ /dev/null @@ -1,75 +0,0 @@ -# flags: --skip-magic-trailing-comma -# We should not remove the trailing comma in a single-element subscript. -a: tuple[int,] -b = tuple[int,] - -# But commas in multiple element subscripts should be removed. -c: tuple[int, int,] -d = tuple[int, int,] - -# Remove commas for non-subscripts. -small_list = [1,] -list_of_types = [tuple[int,],] -small_set = {1,} -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,] -b = tuple[int,] - -# But commas in multiple element subscripts should be removed. -c: tuple[int, int] -d = tuple[int, int] - -# Remove commas for non-subscripts. -small_list = [1] -list_of_types = [tuple[int,]] -small_set = {1} -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)