Commit Graph

118 Commits

Author SHA1 Message Date
Łukasz Langa
b4cee97c99 Link fix to issue 2018-05-15 22:15:28 -07:00
Łukasz Langa
5a47fd13cc Don't use optional parentheses in unnecessary situations
If an expression starts or ends with a bracket and only contains a single
delimiter, don't wrap it in additional optional parentheses.  We can use the
brackets for the split.

Fixes #177

Fixes #193
2018-05-15 22:13:16 -07:00
Łukasz Langa
2b3206dc23 Document .pyi formatting 2018-05-15 13:05:19 -07:00
Łukasz Langa
3eab6d3131 acks += miggaiowski 2018-05-15 01:08:51 -07:00
Łukasz Langa
3eea3aad86 Don't explode trailers that fit in a single line 2018-05-15 01:05:39 -07:00
Łukasz Langa
5db5697eb1 acks += JelleZijlstra 2018-05-15 01:05:39 -07:00
jose nazario
0da97417ed fix a spelling typo (#206) 2018-05-12 18:44:30 +01:00
Łukasz Langa
262230a13b Document string prefix standardization 2018-05-09 15:45:38 -07:00
Vishwas B Sharma
2c6413f2b2 Adding Jupyter Notebook magic command (#200) 2018-05-09 18:26:56 -04:00
Łukasz Langa
32e2f20e9a Show badge for stable docs, not latest 2018-05-09 00:07:27 -07:00
Łukasz Langa
e400fe8582 Clarify language in README 2018-05-08 21:57:09 -07:00
Łukasz Langa
793450aeb0 Automatic management of parentheses in assignments
Fixes #140

Note: this is an evolution but the end result needs to be different.  See
cantfit.py for some good examples on bad formatting caused by this change.
2018-05-08 21:57:09 -07:00
Łukasz Langa
7811f957f3 Delimit multiline expressions according to math operator priority
Fixes #148
2018-05-08 21:57:09 -07:00
Łukasz Langa
1747c388bb Discover whether a file is Python 3.6+ also by stars in calls
Fixes a pathological situation where if a function signature used a trailing
comma but was later reformatted to a single line (with the trailing comma
removed), Black would change its mind whether a file is Python
3.6-compatible between runs.
2018-05-08 21:57:09 -07:00
Łukasz Langa
0967dfcbeb Don't fail the entire right_hand_split if an optional split failed
Fixes splitting long import lines with only a single name.
2018-05-08 10:11:16 -07:00
Łukasz Langa
cfb003f51c Make parentheses invisible recursively in atoms
This fixes non-deterministic formatting when multiple pairs of removable
parentheses are used.

Fixes #183
2018-05-07 11:13:55 -07:00
Łukasz Langa
c6a6cfd3a2 Update README (change log; acks += skapil; acks += tiran) 2018-05-07 10:29:37 -07:00
Łukasz Langa
21ccf44b27 More detailed isort configuration explanation 2018-05-07 10:10:54 -07:00
David Szotten
e84dee52d9 Should this be "_cede_ control" (#187) 2018-05-02 20:25:23 -07:00
Zsolt Dollenstein
9f096d5536 Format subscriptions in a PEP-8 compliant way (#178)
Fixes #157
2018-04-30 22:49:30 -07:00
Łukasz Langa
0f3ecb7e50 18.4a4 hotfix: don't populate the cache on --check
Fixes #175
2018-04-27 14:04:46 -07:00
Łukasz Langa
25abcea6c5 Reword inspiration
Fixes #167
2018-04-26 17:13:17 -07:00
Łukasz Langa
1445bea97e 18.4a3 2018-04-24 13:52:12 -07:00
Łukasz Langa
09f5ee3a19 Split imports like isort
Fixes #127

Partially addresses #152
2018-04-24 13:44:28 -07:00
Łukasz Langa
b250aed47b Do not enforce empty lines after control flow statements
Fixes #90
2018-04-24 12:42:46 -07:00
Łukasz Langa
9d671bdbe1 Split ternary expressions
Fixes #141
2018-04-24 12:21:56 -07:00
Jonas Obrist
92957a41e3 Make cache work with non-default line lenghts (#163) 2018-04-24 11:56:50 -07:00
Łukasz Langa
52fda8b0e9 Support sticky standalone comments (comments preceding defs, classes, and decorators)
Fixes #56
Fixes #154
2018-04-24 11:50:31 -07:00
Josh Holland
337a4199f9 Add install instructions for Vim plugin (#131) 2018-04-24 09:36:28 -07:00
Łukasz Langa
2ba1d7ef7a Improve change log message 2018-04-23 16:17:12 -07:00
Łukasz Langa
54d707e10a Allow standalone comments to close code blocks
Fixes #16
Fixes #32
2018-04-23 16:17:12 -07:00
Łukasz Langa
06e95b1e9b Show full path on diffs
Fixes #130
2018-04-23 12:00:03 -07:00
Łukasz Langa
2e52a2b3ec acks += csurfer 2018-04-23 11:48:58 -07:00
Łukasz Langa
d73166c42b Move delimiter token skipping to BracketTracker
Also, added lambda argument delimiter skipping.

Fixes #133
2018-04-21 15:08:36 -07:00
Jonas Obrist
5cfea54c15 fixed cache file location in readme (#150) 2018-04-21 12:15:13 -07:00
Łukasz Langa
e00e3d5bb2 acks += ojii 2018-04-18 22:17:18 -07:00
Jonas Obrist
639b62dcd3 Added caching (#136)
Black will cache already formatted files using their file size and
modification timestamp. The cache is per-user and will always be used
unless Black is used with --diff or with code provided via standard
input.
2018-04-18 17:27:07 -07:00
jgirardet
f7fd36b228 add sublack plugin for sublimetext (#137) 2018-04-17 13:24:29 -07:00
Zsolt Dollenstein
68cc9786d3 Add changelog entry 2018-04-17 20:46:40 +01:00
Łukasz Langa
a764f1bb3b Generalize star expression handling
Fixes #132
2018-04-16 01:34:15 -07:00
Łukasz Langa
f294cc272c 18.4a2 2018-04-13 12:06:40 -07:00
Zsolt Dollenstein
2104b7cdcb Handle unnecessarily escaped strings (#128) 2018-04-13 11:31:23 -07:00
Łukasz Langa
c071af761e Consistent empty lines in Change Log 2018-04-11 23:36:50 -07:00
Łukasz Langa
51635ef68c Advertise Windows support in Vim plugin 2018-04-11 23:29:57 -07:00
Łukasz Langa
19d69b34e5 Fix placement of dictionary unpacking inside dict literals
Fixes #111
2018-04-11 23:22:22 -07:00
Łukasz Langa
9138a75b75 Fix parsing of unaligned standalone comments
Fixes #99
Fixes #112
2018-04-11 23:22:22 -07:00
Łukasz Langa
cb5aadad74 Automatic parentheses management
Fixes #4
2018-04-11 01:36:18 -07:00
Łukasz Langa
e8ba352777 team += zsol 2018-04-09 15:09:45 -07:00
Łukasz Langa
6f6762dba0 Console formatting nits 2018-04-09 15:09:22 -07:00
Steven M. Vascellaro
ecc294741e README: Add instructions for PyCharm (#81)
Instructions to add `black` to "External Tools" in PyCharm.

Adapted from https://kirankoduru.github.io/python/pylint-with-pycharm.html
2018-04-09 12:00:37 -07:00