black/tests
Henri Holopainen 66008fda5d
[563] Fix standalone comments inside complex blocks crashing Black (#4016)
Bracket depth is not an accurate indicator of standalone comment position inside more complex blocks because bracket depth can be virtual (in loops' and lambdas' parameter blocks) or from optional parens. Here we try to stop cumulating lines upon standalone comments in complex blocks, and try to make standalone comment processing more simple. The fundamental idea is, that if we have a standalone comment, it needs to go on its own line, so we always have to split.

This is not perfect, but at least a first step.
2023-11-07 11:29:24 -08:00
..
data [563] Fix standalone comments inside complex blocks crashing Black (#4016) 2023-11-07 11:29:24 -08:00
__init__.py Remove deprecated use of 'setup.py test' (#1275) 2020-05-08 06:23:50 -07:00
conftest.py add support for printing the diff of AST trees when running tests (#3902) 2023-09-28 07:03:24 -07:00
empty.toml Add --target-version option to allow users to choose targeted Python versions (#618) 2019-02-06 18:43:50 -08:00
optional.py Migrate mypy config to pyproject.toml (#3936) 2023-10-16 05:24:16 -07:00
test_black.py Support formatting specified lines (#4020) 2023-11-06 18:05:25 -08:00
test_blackd.py Migrate mypy config to pyproject.toml (#3936) 2023-10-16 05:24:16 -07:00
test_format.py Support formatting specified lines (#4020) 2023-11-06 18:05:25 -08:00
test_ipynb.py Avoid importing IPython if notebook cells do not contain magics (#3782) 2023-07-16 21:09:26 -04:00
test_no_ipynb.py Enable PYTHONWARNDEFAULTENCODING = 1 in CI (#3763) 2023-07-04 16:38:39 -07:00
test_ranges.py Support formatting specified lines (#4020) 2023-11-06 18:05:25 -08:00
test_trans.py Rewrite mostly useless assert in test_trans.py (#3810) 2023-07-27 12:51:28 -04:00
test.toml Add support for custom python cell magics (#2744) 2022-01-20 16:45:28 -08:00
util.py Support formatting specified lines (#4020) 2023-11-06 18:05:25 -08:00