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
Łukasz Langa
c9b73b99ac
Support nested lambdas in BracketTracker
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
a68dd928e6
Fix docstrings of visit_stmt and normalize_invisible_parens
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
Codey Oxley
e196180a0d
Addresses #174 Neovim Error ( #197 )
...
Neovim uses stdout for `msgpack` communication and the `subprocess` call for `virtualenv` was leaking that stream. Fix is to attach to a `subprocess.PIPE`.
2018-05-08 21:08:25 -07:00
Łukasz Langa
987543001a
Upgrade dependencies
2018-05-08 10:11:16 -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
27a36671fe
Diff version
2018-05-07 11:36:51 -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
dc0c14240e
Don't leave invalid trailing comma on imports
...
Fixes #185
2018-05-07 10:40:18 -07:00
Łukasz Langa
c6a6cfd3a2
Update README (change log; acks += skapil; acks += tiran)
2018-05-07 10:29:37 -07:00
Łukasz Langa
b1cd59f267
Formatting nits
2018-05-07 10:22:43 -07:00
snlkapil
6dbb657681
Removing empty parentheses after class name ( #180 )
2018-05-07 10:15:24 -07:00
Christian Heimes
2d9eaafa97
Output something when no files are reformatted ( #190 )
...
Just executing ``black`` without any argument does not print any message
to stdout or stderr. It's rather confusing, because the user doesn't
know what happened.
In ``len(sources) == 0`` case, black now prints ``No paths given. Nothing to
do``.
Signed-off-by: Christian Heimes <christian@python.org>
2018-05-07 10:12:47 -07:00
Christian Heimes
8325f893b4
Add more files/directories to .gitignore ( #191 )
...
Ignore .tox, black.egg-info and __pycache__ directories.
Signed-off-by: Christian Heimes <christian@python.org>
2018-05-07 10:11:21 -07:00
Łukasz Langa
21ccf44b27
More detailed isort configuration explanation
2018-05-07 10:10:54 -07:00
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