black/tests/data
Yilei "Dolee" Yang ba618a307a
Add parens around implicit string concatenations where it increases readability (#3162)
Adds parentheses around implicit string concatenations when it's inside
a list, set, or tuple. Except when it's only element and there's no trailing
comma.

Looking at the order of the transformers here, we need to "wrap in
parens" before string_split runs. So my solution is to introduce a
"collaboration" between StringSplitter and StringParenWrapper where the
splitter "skips" the split until the wrapper adds the parens (and then
the line after the paren is split by StringSplitter) in another pass.

I have also considered an alternative approach, where I tried to add a
different "string paren wrapper" class, and it runs before string_split.
Then I found out it requires a different do_transform implementation
than StringParenWrapper.do_transform, since the later assumes it runs
after the delimiter_split transform. So I stopped researching that
route.

Originally function calls were also included in this change, but given
missing commas should usually result in a runtime error and the scary
amount of changes this cause on downstream code, they were removed in
later revisions.
2022-08-30 22:52:00 -04:00
..
fast Remove hard coded test cases (#3062) 2022-05-18 12:11:37 -07:00
include_exclude_tests Do not use gitignore if explicitly passing excludes (#2170) 2021-05-07 14:54:21 +02:00
invalid_gitignore_tests Present a more user-friendly error if .gitignore is invalid (#2414) 2021-08-20 19:54:53 -04:00
invalid_nested_gitignore_tests Present a more user-friendly error if .gitignore is invalid (#2414) 2021-08-20 19:54:53 -04:00
jupyter Remove hard coded test cases (#3062) 2022-05-18 12:11:37 -07:00
miscellaneous Remove invalid syntax in docstrings -S --preview test (#3205) 2022-08-02 17:22:04 -04:00
nested_gitignore_tests Fix: black only respects the root gitignore. (#2225) 2021-05-16 13:51:27 -04:00
preview Add parens around implicit string concatenations where it increases readability (#3162) 2022-08-30 22:52:00 -04:00
preview_39 Remove hard coded test cases (#3062) 2022-05-18 12:11:37 -07:00
preview_310 Use underscores instead of a space in a test file's name (#3180) 2022-07-19 21:33:00 -04:00
py_36 Remove hard coded test cases (#3062) 2022-05-18 12:11:37 -07:00
py_37 Remove hard coded test cases (#3062) 2022-05-18 12:11:37 -07:00
py_38 Remove hard coded test cases (#3062) 2022-05-18 12:11:37 -07:00
py_39 Remove hard coded test cases (#3062) 2022-05-18 12:11:37 -07:00
py_310 Remove hard coded test cases (#3062) 2022-05-18 12:11:37 -07:00
py_311 Implement support for PEP 646 (#3071) 2022-05-26 09:45:22 -07:00
simple_cases Fix an infinite loop when using # fmt: on/off ... (#3158) 2022-07-19 20:57:23 -04:00
empty_pyproject.toml Support pyproject.toml 2018-06-06 17:02:10 -07:00