Commit Graph

366 Commits

Author SHA1 Message Date
wouter bolsterlee
c7bc22388d tweak grammar in docs about fluent interfaces (#247)
...to make the sentence a bit easier to understand.
2018-05-22 08:54:28 -07:00
Łukasz Langa
658eb7161d Fix unstable formatting on trailers omitted from line splitting with comments
Fixes #238
2018-05-22 00:38:31 -07:00
Łukasz Langa
9a6c88c7f4 Fix invalid code on stars in long from-imports being wrapped in parentheses
Fixes #234
2018-05-21 16:37:29 -07:00
Łukasz Langa
808754af18 Fix optional parentheses being removed within # fmt: off sections
Fixes #224
2018-05-21 15:21:14 -07:00
Hugo
86e1c36507 Sentence case (#242) 2018-05-21 13:20:41 -07:00
Łukasz Langa
91de9ea6e3 Fix invalid code in an omitted trailer on large expressions
Fixes #237
2018-05-21 12:29:36 -07:00
Łukasz Langa
f1f12284e0 Mention fix for pickle files 2018-05-21 11:22:08 -07:00
Carol Willing
5fd1e91bff Add navigation (#229) 2018-05-21 09:58:04 -07:00
Hugo
34646945e7 README updates (#235)
* Consistent titles in 'Sentence case'
* Add console Markdown formatting
* Fix macOS typos
* Fix Homebrew typo
2018-05-20 09:50:41 -07:00
Łukasz Langa
c891c65b6b Store grammar pickle caches in CACHE_DIR
Fixes #192

Fixes #203
2018-05-19 14:06:27 -07:00
Christian Heimes
5070a24121 Include blib2to3 LICENSE file (#230)
See: https://github.com/ambv/black/issues/226
Signed-off-by: Christian Heimes <christian@python.org>
2018-05-19 13:09:19 -07:00
Christian Heimes
642f240253 Remove grammar pickles from git (#225)
There is no need to keep the pickled grammar files in git. PR #203 will
move them into a user-specific cache directory any way.

See: https://github.com/ambv/black/issues/192
Signed-off-by: Christian Heimes <christian@python.org>
2018-05-18 16:59:05 -04:00
Christian Heimes
fef8c71cb7 Include stub files (*.pyi) (#222)
Fixes: https://github.com/ambv/black/issues/221
Signed-off-by: Christian Heimes <christian@python.org>
2018-05-18 18:24:15 +01:00
Łukasz Langa
7395f55564 18.5b0 2018-05-17 17:32:43 -07:00
Łukasz Langa
180bc06ede Don't explode a one-element collection ending with a comma. 2018-05-17 17:32:43 -07:00
Łukasz Langa
87b8df28c4 Fix overly optimistic removal of optional parentheses
The current behavior is explained with much detail in
`can_omit_invisible_parens`.
2018-05-17 17:32:43 -07:00
Łukasz Langa
385e3a1049 Don't allow indexing to trigger omitting optional parentheses 2018-05-17 17:32:43 -07:00
Łukasz Langa
5dfc911e6b Fix consecutive string literals not forcing optional parentheses 2018-05-17 17:32:43 -07:00
Łukasz Langa
31fbd1982f Avoid treating ellipsis as a dot delimiter 2018-05-17 17:32:43 -07:00
Łukasz Langa
dd4477b701 Always explode data structure literals
Fixes #152
2018-05-17 17:32:43 -07:00
Łukasz Langa
dafa12f10b Consistent empty lines in the README 2018-05-17 17:32:43 -07:00
Hynek Schlawack
e94bda11c3 Fix double colon (#216) 2018-05-16 23:38:47 -04:00
Łukasz Langa
3ad0f5855c Fix multiline strings unnecessarily wrapped in optional parentheses
Fixes #215
2018-05-16 19:19:48 -07:00
Łukasz Langa
665ed8a240 Explain automatic parentheses management better 2018-05-16 15:26:36 -07:00
Łukasz Langa
8c74d7901f Implement fluent interfaces
Fixes #67
2018-05-16 15:21:40 -07:00
Łukasz Langa
1dadeef47a Consider in, not in, is, is not operators 2018-05-16 14:46:43 -07:00
Łukasz Langa
f24635635e For omitting optional parentheses, ignore delimiters of lower priorities 2018-05-16 14:40:23 -07:00
Łukasz Langa
96e68f0341 Report progress on multiple files incrementally 2018-05-16 11:45:32 -07:00
Ł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
8b64e916f6 Simplify is_trivial_* methods 2018-05-15 13:25:00 -07:00
Łukasz Langa
2b3206dc23 Document .pyi formatting 2018-05-15 13:05:19 -07:00
Łukasz Langa
634dc5a20e Warn that right_hand_split() modifies bracket_depth in leaves 2018-05-15 12:31:33 -07:00
Jelle Zijlstra
14ba1bf8b6 Add support for pyi files (#210)
Fixes #207
2018-05-15 15:09:35 -04: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
a677713ebf Re-use indexes of current iteration in comments_after() 2018-05-15 01:05:39 -07:00
Łukasz Langa
5db5697eb1 acks += JelleZijlstra 2018-05-15 01:05:39 -07:00
Łukasz Langa
6a01b76419 Travis workaround script no longer necessary 2018-05-15 01:05:39 -07:00
Miguel Gaiowski
c667b85a7f Check for broken symlinks before checking file data (#202) 2018-05-15 01:13:48 -04:00
jose nazario
0da97417ed fix a spelling typo (#206) 2018-05-12 18:44:30 +01:00
Łukasz Langa
223268aaae Update Travis to use the default 3.7-dev binary 2018-05-09 15:56:44 -07: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
Jelle Zijlstra
21c8dc85f5 Remove u prefix if unicode_literals is present (#199) 2018-05-09 18:26:41 -04:00
Łukasz Langa
32e2f20e9a Show badge for stable docs, not latest 2018-05-09 00:07:27 -07:00
Łukasz Langa
90e14e8b61 Don't make parentheses invisible around yield expressions 2018-05-08 23:31:41 -07:00
Łukasz Langa
7595dabb43 Fix docstring of is_vararg 2018-05-08 23:03:59 -07:00
Łukasz Langa
e400fe8582 Clarify language in README 2018-05-08 21:57:09 -07:00
Łukasz Langa
1b51e2c078 Automatic management of parentheses in elif, too 2018-05-08 21:57:09 -07:00