Commit Graph

366 Commits

Author SHA1 Message Date
Łukasz Langa
6a9d09cd44 Store pickles for 3.8.0a0 2018-04-18 22:17:00 -07:00
Łukasz Langa
df80103c33 Solve the Travis failure with 3.7 from deadsnakes 2018-04-18 20:27:34 -07:00
Łukasz Langa
0a340e1f22 Update documentation
* Add "Ignore non-modified files" from the README
* Add missing functions to the reference
2018-04-18 18:19:04 -07:00
Łukasz Langa
aa5629204c Docstring for max_delimiter_priority_in_atom() 2018-04-18 18:13:36 -07:00
Łukasz Langa
15d5e36ea3 Simplify single-file vs. multi-file modes 2018-04-18 17:59:28 -07:00
Łukasz Langa
8429f3a63b Revert format_file_in_place() and format_stdin_to_stdout() to return bools
`Changed.CACHED` is meaningless for those two functions.
2018-04-18 17:46:03 -07:00
Łukasz Langa
dcd77136f8 Update 3.6.4 grammar pickle 2018-04-18 17:41:49 -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
0507044474
Merge pull request #138 from ambv/star-expr
Parse complex expressions in parameters after * and **
2018-04-17 20:52:17 +01:00
Zsolt Dollenstein
68cc9786d3 Add changelog entry 2018-04-17 20:46:40 +01:00
Zsolt Dollenstein
661908cd02 use STARS instead of STAR | DOUBLESTAR 2018-04-17 20:35:59 +01:00
Zsolt Dollenstein
5192ed484b Parse complex expressions in parameters after * and ** 2018-04-17 20:34:02 +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
Zsolt Dollenstein
8e7848c63e Open temporary files with utf-8 encoding (#126)
This is not the default on Windows.
2018-04-12 11:19:21 -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
dc32757bcc Make Vim plugin work on macOS/Linux again 2018-04-11 23:29:00 -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
e41844feb7 Remove debug print 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
Zsolt Dollenstein
1909d8cc6b Add windows support for black vim plugin (#123)
This is mostly a best effort support, and I only tested it on my
machine.
2018-04-11 19:55:47 -07:00
Łukasz Langa
39a5fe7a55 18.4a1 2018-04-11 19:22:16 -07:00
Łukasz Langa
cf8e998f46 Don't omit escaping the second consecutive quote
This would produce invalid code for strings like `"x = ''; y = \"\""`.
2018-04-11 16:25:47 -07:00
Łukasz Langa
bc6b912fcb Fix an embarrassing UnboundLocalError 2018-04-11 15:49:14 -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
Zsolt Dollenstein
ecdbf085a7 Add support for all valid string literals (#115) 2018-04-09 14:36:40 -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
Mika⠙
00cadd43ee Document that W503 is not compliant with PEP 8 (#114) 2018-04-06 08:02:11 -07:00
Łukasz Langa
60a8333857 team += autophagy 2018-04-05 14:27:27 -07:00
Łukasz Langa
c4a477bc69 Link VCS integration in documentation 2018-04-05 13:45:16 -07:00
Łukasz Langa
e36b8c71bb [blib2to3] Support non-ASCII identifiers
This support isn't *exactly* right per PEP 3131 as the regex engine is a bit
too limited for that and I didn't want to spend time on Other_ID_Start and
Other_ID_Continue unless they're actually needed.

Hopefully this doesn't slow it down too much.
2018-04-05 02:29:01 -07:00
Zsolt Dollenstein
2e0bb0fa9f Handle arbitrary number of backslashes during string normalization (#110) 2018-04-05 02:28:46 -07:00
Łukasz Langa
30d921f74c Simplify delimiter logic 2018-04-04 16:33:10 -07:00
Łukasz Langa
b7f4ace0d1 acks += asottile 2018-04-04 15:11:48 -07:00
Łukasz Langa
f20e1f61f8 Update change log 2018-04-04 15:10:58 -07:00
Anthony Sottile
12a095f038 Update language-version => language_version (#106) 2018-04-04 15:09:34 -07:00
Anthony Sottile
6dd16bf7ae Add a description for the pre-commit hook (#107)
This string appears on the hooks page on pre-commit.com.
2018-04-04 15:07:57 -07:00
Zsolt Dollenstein
51b3b2624d Handle backslashes in raw strings while normalizing (#105)
In raw strings, a single backslash means a literal backslash. It is also used to escape quotes if it precedes them. This means it is impossible to change the quote type for strings that contain an unescaped version of the other quote type.
Fixes #100
2018-04-04 13:20:46 -07:00
Łukasz Langa
f8e9544c93
Add integration for pre-commit.com (#104)
Fixes #103
2018-04-04 13:19:30 -07:00
Łukasz Langa
0f99987c0a acks += ikatanic 2018-04-04 09:57:12 -07:00
Łukasz Langa
63da5d088c 3.6.5 grammar pickles 2018-04-04 09:55:56 -07:00
Ivan Katanić
1d3d743dfb Fix --check for multiple files (#101) 2018-04-04 09:53:34 -07:00
Łukasz Langa
21c32d80b6 Add --quiet
Fixes #78
2018-04-02 23:17:39 -07:00
Łukasz Langa
2d80366ac1 [blib2to3] Make the grammar pickles faster 2018-04-02 18:28:24 -07:00
Łukasz Langa
65c52a655f 18.4a0 2018-04-01 00:30:45 -07:00