Christian Heimes
adf4ebd2d9
Remove unnecessary shebang lines ( #189 )
...
Since black.py is not marked as executable, the shebang in black.py serves
no purpose. black should be invoked through its entry point any way.
token.py is an internal module without a __name__ == '__main__' block or
other executable code. It contains just list of constants and small
helper functions.
Signed-off-by: Christian Heimes <christian@python.org>
2018-05-04 13:52:17 -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
Zsolt Dollenstein
1885721182
fix type errors in setup.py ( #179 )
2018-04-29 00:50:08 -07:00
Łukasz Langa
6243540ae7
.gititnore += .vscode
2018-04-28 13:47:59 -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
b62bd4de75
Add explode_split
to documentation
2018-04-24 14:27:21 -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
Vishwas B Sharma
29e97d1d4a
[ #154 ] Handle comments between decorators properly ( #166 )
2018-04-24 09:38:12 -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
c86fb36232
Accelerate Unicode identifier support (backport from Lib/tokenize.py)
2018-04-23 14:31:35 -07:00
Łukasz Langa
82198030ee
Remove nonsensical grammar from blib2to3
2018-04-23 14:24:14 -07:00
Gregory P. Smith
959ff798bc
Put the PSF license in blib2to3/ to mark that code. ( #162 )
...
The blib2to3/ code is PSF licensed as that is where the code originated.
This change just drops a proper copy of that license file into the
directory tree to make that clear.
2018-04-23 14:19:24 -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
3ddf73337d
Refactor reformat_one
and schedule_formatting
to decrease state
2018-04-23 11:48:01 -07:00
Zsolt Dollenstein
c012c70176
Fix tests on windows ( #159 )
2018-04-23 11:23:36 -07:00
Vishwas B Sharma
5e1e1a1820
[ #149 ] Make check and diff not mutually exclusive ( #161 )
...
Fixes #149 .
2018-04-23 11:23:11 -07:00
Łukasz Langa
b07ca2b7d5
Add AppVeyor for Windows builds
2018-04-21 15:32:47 -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
Zsolt Dollenstein
b5b658da06
Skip handling signals on event loops that don't support it ( #156 )
2018-04-21 12:16:02 -07:00
Jonas Obrist
5cfea54c15
fixed cache file location in readme ( #150 )
2018-04-21 12:15:13 -07:00
Łukasz Langa
2446941824
Remove dead code
2018-04-19 00:09:13 -07:00
Łukasz Langa
c984042ad2
Print exact Python version with build date
2018-04-18 22:29:01 -07:00
Łukasz Langa
e00e3d5bb2
acks += ojii
2018-04-18 22:17:18 -07:00
Ł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