Commit Graph

8 Commits

Author SHA1 Message Date
Bryan Bugyi
edf1c9dc0f
Fix bug which causes f-expressions to be split (#1809)
Closes #1807.
2020-11-06 16:17:23 -08:00
Bryan Bugyi
6c3f818185
Fix bug where black tries to split string on escaped space (#1799)
Closes #1505.
2020-10-31 10:42:36 -07:00
Bryan Bugyi
cd055efd7d
Fix unstable subscript assignment string wrapping (#1678)
Fixes #1598
2020-09-10 09:24:01 -07:00
Bryan Bugyi
6284953d07
Fix crash on assert and parenthesized % format (fixes #1597, fixes #1605) (#1681) 2020-09-06 09:15:40 -07:00
Bryan Bugyi
7bca930ca3
Fix crash on concatenated string + comment (fixes #1596) (#1677)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2020-09-06 08:02:57 -07:00
Bryan Bugyi
e3ccabb23c
Fix unstable formatting on string split + % formatting (#1680)
Fixes #1595
2020-09-05 17:24:00 -07:00
Łukasz Langa
788268bc39 Re-implement magic trailing comma handling:
- when a trailing comma is specified in any bracket pair, that signals to Black
  that this bracket pair needs to be always exploded, e.g. presented as "one
  item per line";

- this causes some changes to previously formatted code that erroneously left
  trailing commas embedded into single-line expressions;

- internally, Black needs to be able to identify trailing commas that it put
  itself compared to pre-existing trailing commas. We do this by using/abusing
  lib2to3's `was_checked` attribute.  It's True for internally generated
  trailing commas and False for pre-existing ones (in fact, for all
  pre-existing leaves and nodes).

Fixes #1288
2020-08-21 16:45:30 +02:00
Bryan Bugyi
544ea9c217
Improve String Handling (#1132)
This pull request's main intention is to wraps long strings (as requested by #182); however, it also provides better string handling in general and, in doing so, closes the following issues:

Closes #26
Closes #182
Closes #933
Closes #1183
Closes #1243
2020-05-08 14:56:21 +02:00