dylanjblack
9394de150e
Fix trailing comma for function with one arg ( #880 ) ( #891 )
...
Modified maybe_remove_trailing_comma to remove trailing commas for
typedarglists (in addition to arglists), and updated line split logic
to ensure that all lines in a function definition that contain only one
arg have a trailing comma.
2019-06-14 21:49:49 -07:00
Ofek Lev
1bbb01b854
Add Datadog to list of users ( #876 )
2019-06-06 08:34:58 +01:00
Aviskar KC
d410763d8d
Add link to the pyproject.toml for setting up pre-commit hook ( #885 )
2019-06-06 08:33:09 +01:00
Mike
7ce3894f23
[blib2to3] Fixed a typo and removed an unused import. ( #848 )
2019-05-26 12:10:14 +02:00
Jelle Zijlstra
1c43252aa3
fix some out-of-date docstrings; other cleanup ( #865 )
2019-05-26 12:09:11 +02:00
Yngve Høiseth
bc7a4b2391
Document cache location configuration ( #866 )
2019-05-26 12:08:22 +02:00
Yngve Høiseth
340d87b47c
Document the need to enter the virtual environment shell ( #868 )
2019-05-26 11:58:29 +02:00
Zsolt Dollenstein
519c06a8cc
Don't introduce quotes to f-string sub-expressions on string boundaries ( #871 )
2019-05-26 11:58:00 +02:00
Zsolt Dollenstein
5b01a8e3b0
bump Pipfile.lock
2019-05-26 11:45:47 +02:00
Michael Flaxman
cbe455ad66
minor performance improvement (~2% speedup in unit tests) ( #858 )
2019-05-21 20:02:17 -07:00
Stephen Rosen
a4399f3054
Add doc clarifying that there is no blackd client ( #859 )
...
Resolves #854
The first sentence of this is pretty uncontroversial. (Though I wasn't
sure exactly where in the text to put it.)
I thought it would also be nice to show the `curl` test with a tiny
statement that actually reformats.
2019-05-20 18:57:09 +01:00
Katie McLaughlin
b85c345dbc
Remove happiness of error message ( #852 )
2019-05-16 13:02:17 +01:00
Jelle Zijlstra
957ba24bb6
remove obviously unnecessary parentheses ( #850 )
...
Fixes #548
2019-05-15 21:11:04 -07:00
Łukasz Langa
188c31db7c
Mention support for async generators
2019-05-09 18:19:33 +02:00
Łukasz Langa
189520bff1
Change log wording and ordering
2019-05-09 18:18:10 +02:00
Łukasz Langa
bc36e95966
acks += bgw
2019-05-09 18:04:09 +02:00
Benjamin Woodruff
448885b256
Move tokenizer config onto grammar, rename flag
...
Based on the feedback in
https://github.com/python/black/pull/845#issuecomment-490622711
- Remove TokenizerConfig, and add a field to Grammar instead.
- Pass the Grammar to the tokenizer.
- Rename `ASYNC_IS_RESERVED_KEYWORD` to `ASYNC_KEYWORDS` and
`ASYNC_IS_VALID_IDENTIFIER` to `ASYNC_IDENTIFIERS`.
2019-05-09 17:59:29 +02:00
Benjamin Woodruff
f8617f975d
Add support for always tokenizing async/await as keywords
...
Fixes #593
I looked into this bug with @ambv and @carljm, and we reached the
conclusion was that it's not possible for the tokenizer to determine if
async/await is a keyword inside all possible generators without breaking
the grammar for older versions of Python.
Instead, we introduce a new tokenizer mode for Python 3.7+ that will
cause all async/await instances to get parsed as a reserved keyword,
which should fix async/await inside generators.
2019-05-09 17:59:29 +02:00
Łukasz Langa
8c8adedc2a
acks += revfried
2019-05-09 17:08:31 +02:00
Łukasz Langa
0aa21af9e1
Mention fix for backslashes before standalone comments
2019-05-09 17:07:06 +02:00
Łukasz Langa
2227e6b1cd
Remove spurious prints
2019-05-09 04:49:48 +02:00
Łukasz Langa
6bb90f22ed
Use to handle legacy async/await handling in assert_equivalent
2019-05-08 23:33:39 +02:00
Carol Willing
f5381c7c5f
Add PyCon talk link to README ( #844 )
2019-05-08 14:52:41 -04:00
Jason Fried
866be06646
Make --safe work for Python2.7 syntax, by using typed_ast for safe validation ( #840 )
2019-05-08 07:45:59 -07:00
Carl Meyer
6fdbdb4ee3
Avoid unstable formatting when comment follows escaped newline. ( #839 ). Fixes #767 .
2019-05-08 09:53:20 -04:00
Hugo
f50ba078b3
Minor README updates ( #842 )
...
* Header in sentence case, for consistency
* Black in italics
2019-05-08 09:06:19 -04:00
Łukasz Langa
a23f4cfdbd
Mention Elpy
...
Fixes #689
2019-05-07 22:16:29 +02:00
Łukasz Langa
3b96abdb80
humility -= 1
2019-05-07 20:29:31 +02:00
pmacosta
4931ddd0b1
Use g:pymode_python-defined interpreter if defined and exists, otherwise use existing defaults ( #666 )
...
This is helpful when using custom-compiled interpreters, or alternative
Python interpreters in non-standard locations
2019-05-07 13:28:56 -04:00
Jelle Zijlstra
14cbf737df
don't run more than 61 workers on Windows ( #838 )
2019-05-07 13:11:20 -04:00
Arjaan Buijk
3b2297f6fd
Describe how to add black to Wing IDE ( #758 )
2019-05-07 10:17:00 -04:00
Jelle Zijlstra
06004cd319
Add black -c "code"
( #761 )
2019-05-07 09:58:59 -04:00
Jon Dufresne
e7a44296c3
Remove deprecated license_file from setup.cfg ( #825 )
...
Starting with wheel 0.32.0 (2018-09-29), the "license_file" option is
deprecated.
https://wheel.readthedocs.io/en/stable/news.html
The wheel will continue to include LICENSE, it is now included
automatically:
https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file
2019-05-07 09:57:43 -04:00
Jelle Zijlstra
4a7da71069
add to changelog
2019-05-07 09:52:41 -04:00
Jelle Zijlstra
de806405d2
Add parentheses around tuple unpack assignment ( #832 )
...
Fixes #656
2019-05-07 09:51:28 -04:00
Jelle Zijlstra
18119d3846
Remove unnecessary parens around yield ( #834 )
2019-05-07 09:49:50 -04:00
Hugo
c2c2f72038
Update calver version number ( #835 )
...
If released this month, it will be 19.5b0.
2019-05-06 22:02:09 -04:00
Jelle Zijlstra
dd5777af06
add to CHANGELOG
2019-05-06 11:09:04 -04:00
Jelle Zijlstra
6b994fdb8a
fix handling of comments in from imports ( #829 )
...
Fixes #671
2019-05-06 09:13:25 -04:00
Tom Christie
e6ddb68c78
Wrap loop.run_in_executor
up in asyncio.ensure_future
for reliable cross-platform berhavior. ( #679 )
...
Closes #494
Task completion should also remove the task from `pending`.
Only replicates on some platforms. (eg. Can replicate on Python 3.7+, with either Windows or whatever default Linux distro Travis uses.)
2019-05-05 14:58:26 -04:00
Hugo
4a953b7241
ambv/black -> python/black ( #819 )
2019-05-02 20:19:52 +01:00
Hugo
597a0e102c
Fix B011 ( #820 )
...
Do not call assert False since python -O removes these calls. Instead callers should raise AssertionError().
2019-05-02 20:09:49 +01:00
Daniel Hahler
acafdcb594
minor: remove wrong comment in .flake8 ( #788 )
...
This is there since the initial commit, which did not have a setup.cfg.
2019-05-02 13:03:02 -04:00
Jelle Zijlstra
cea13f4984
Split the TRAILING_COMMA feature ( #763 )
2019-03-25 08:22:02 -07:00
Daniele Esposti
0b7913f904
Terget version option kebab-style ( #770 )
2019-03-20 08:40:01 -07:00
Thom Lu
a2f6706a1e
fix vim plugin for 19.3b0 ( #755 ) ( #766 )
2019-03-17 09:27:50 -07:00
Jelle Zijlstra
ba64fc757c
redo grammar selection, add test ( #765 )
2019-03-16 11:35:18 -07:00
Zsolt Dollenstein
2410213857
fix appveyor deploy section
2019-03-16 16:26:50 +00:00
Zsolt Dollenstein
f68500497f
Use new github token for appveyor release
2019-03-16 14:00:59 +00:00
Jelle Zijlstra
f92cd878ad
add change log entry ( #764 )
2019-03-15 11:42:24 -07:00