Commit Graph

368 Commits

Author SHA1 Message Date
Zsolt Dollenstein
5206560946
add change log entry 2019-06-15 07:36:34 +01: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
Yngve Høiseth
bc7a4b2391 Document cache location configuration (#866) 2019-05-26 12:08:22 +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
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
Ł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
Ł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
Carol Willing
f5381c7c5f Add PyCon talk link to README (#844) 2019-05-08 14:52:41 -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
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
Jelle Zijlstra
4a7da71069
add to changelog 2019-05-07 09:52:41 -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
Hugo
4a953b7241 ambv/black -> python/black (#819) 2019-05-02 20:19:52 +01:00
Daniele Esposti
0b7913f904 Terget version option kebab-style (#770) 2019-03-20 08:40:01 -07:00
Jelle Zijlstra
f92cd878ad
add change log entry (#764) 2019-03-15 11:42:24 -07:00
Jelle Zijlstra
129ebd53a6 Add back --py36 as a deprecated option (#750)
This partially reverts commit 21ab37a5d9.
2019-03-14 17:31:27 +01:00
Łukasz Langa
6af55d8851
Mention tab comment fixes, extend tests 2019-03-14 17:17:50 +01:00
Łukasz Langa
ee7151e50f
Mention atomic cache creation in the change log 2019-03-14 17:17:50 +01:00
Greg Gandenberger
416821947a Indicate that PyCharm instructions also work with IntelliJ (#681)
* Indicate that PyCharm instructions also work with IntelliJ

* Update README.md
2019-03-14 17:16:40 +01:00
Heaford
cfa2557df0 Update README.md - Pycharm instructions not working for files path containing white spaces (#659) 2019-03-14 17:10:49 +01:00
Łukasz Langa
6b381c784b
Mention fix for #632 in the change log 2019-03-14 16:34:40 +01:00
Łukasz Langa
ca9ad698ef
Enhance the type comment patch 2019-03-14 16:26:41 +01:00
Russell Davis
ca679cd177 Fix PyCharm instructions in README (#701)
Without this change, PyCharm won't refresh the file in the editor after Black runs.
2019-03-14 13:45:38 +01:00
Łukasz Langa
53e72102e9
Updates to the change log 2019-03-14 13:40:53 +01:00
Łukasz Langa
087fedb17e
Simplify the #606 patch
Thanks for the original patch to solve #509, @hauntsaninja.
2019-03-14 13:40:52 +01:00
Jelle Zijlstra
ea55ff2878
remove Python implementation-specific versions (#736) 2019-03-07 16:34:34 -08:00
Jelle Zijlstra
21ab37a5d9
remove --py36 (#724)
Fixes #703.
2019-02-24 09:15:03 -08:00
Jelle Zijlstra
f5b14b1afd
split long del statements into multiple lines (#698)
Fixes #693
2019-02-22 22:00:40 -08:00
programmer04
2ae5ce1e6e Fix example with well formated code (add missing comma) (#720) 2019-02-20 11:11:14 -08:00
sponsfreixes
118b612059 Improve examples to use 88 chars line length (#677) (#714)
The examples were wrapping at less than 88 characters, which is not the
default for black.
2019-02-15 22:18:58 -08:00
Greg Gandenberger
a1fd7b26e7 Add PyCharm setup step (#680) 2019-02-13 17:41:58 -08:00
Zsolt Dollenstein
250ba7f04b Remove numeric underscore normalization (#696) 2019-02-06 19:16:49 -08:00
Jelle Zijlstra
36d3c516d3
Add --target-version option to allow users to choose targeted Python versions (#618) 2019-02-06 18:43:50 -08:00
Jakub Kadlubiec
ae8ea510e3 Properly close the code block in README (#695) 2019-02-06 08:05:40 -08:00
Nathan Goldbaum
9d749280bb show how to exclude individual files in the exclude example (#663)
* show how to exclude individual files in the exclude example

* include comments in the regex
2019-02-05 10:50:59 -08:00
Kenyon Ralph
283a5d53a8 README.md: fix mailto link (#660) 2019-01-05 10:46:07 -08:00
Jim Brännlund
55121195ce Add .eggs to default exclusions (#629) 2018-11-29 14:27:08 -08:00
Scott Stevenson
48022801fb Reflect renaming of IPython notebook to Jupyter (#616) 2018-11-22 22:08:20 -08:00
Timo
fa8be4ed82 Add url to pep 257 in readme (#615) 2018-11-22 22:07:08 -08:00
Calum Lind
158f796ef3 Update isort config to use_parentheses instead of combine_as_imports (#547)
The `combine_as_imports=True` modifies isort style as a side-effect and was not the intended purpose of the suggested change in #250. The problem was that isort was actually replacing the parens with backslash and using `combine_as_imports=True` happened to also produce the same result.

The actual setting should be `use_parentheses` as this tells isort to use parenthesis for line continuation instead of \ for lines over the allotted line length limit and matches precisely what black is outputting.
2018-11-08 11:54:05 +01:00
Chuck Wooters
5c2dd96a69 patch main to ensure click_patch() gets called (#572) 2018-10-29 11:10:32 +01:00
Tony Narlock
2cb3c2a050 Typo (#561) 2018-10-29 11:07:50 +01:00
Hugo
85eeea1283 Link to Bugbear's documentation (#577) 2018-10-19 07:58:33 +02:00
jgirardet
44e9cd4a03 Explicit # fmt: on/off indentation level (#554) 2018-10-09 13:11:47 -07:00
jgirardet
f1ac6fe109 add --skip-numeric-underscore-normalization in readme (#537) 2018-09-27 15:47:51 -07:00
Łukasz Langa
7145fa325c
Remove whitespace at the beginning of the file
Fixes #399
2018-09-26 12:18:45 -07:00
Łukasz Langa
c6c8ef76a4
Fix mangling pweave and Spyder IDE special comments
Fixes #532.
2018-09-26 09:42:42 -07:00
Łukasz Langa
9372dc8510
Make CHANGELOG more accurate 2018-09-26 09:20:52 -07:00
jgirardet
0171a5e524 add blackd ignore pyproject (#536) 2018-09-26 13:47:08 +01:00
Zsolt Dollenstein
25d24a10a4 Add trailing comma when a single import doesn't fit on a line. (#504)
Fixes #250.
2018-09-26 13:26:50 +01:00
Zsolt Dollenstein
5f9eb9e4f7 Add underscores to numeric literals with more than six digits (#529) 2018-09-26 12:32:11 +01:00
Tim Swast
2d99573b34 Add .nox directories to default exclude (#525)
[Nox](https://nox.readthedocs.io/) is similar to Tox. It creates a .nox directory that contains virtualenv for testing with different Python versions.
2018-09-25 16:25:58 +01:00
Zsolt Dollenstein
bbf38400ce Uppercase digits in hex literals (#530) 2018-09-25 16:01:56 +01:00
Łukasz Langa
9db8d4b2d7
Move things around in change log for the latest version to sort in rough notability order 2018-09-17 10:15:16 -07:00
Zsolt Dollenstein
a82f186787 blackd: a HTTP server for blackening (#460) 2018-09-17 10:02:25 -07:00
Zsolt Dollenstein
80500748a7
fix unstable formatting when unpacking big tuples (#514)
* fix unstable formatting when unpacking big tuples

* add changelog entry
2018-09-17 12:03:21 +01:00
mikehoyio
6f5e1277e9 Update atom plugin link to point to the python-black plugin (#505) 2018-09-10 10:19:55 +01:00
Zsolt Dollenstein
08f1cdd00b
Make sure async for is not broken up to separate lines (#503)
Fixes #372.
2018-09-08 10:34:08 +01:00
Jon Dufresne
6027cca10d Prefer https:// links where available (#485) 2018-08-28 13:00:05 +01:00
Jon Dufresne
e069017178 Update pypi.python.org URL to pypi.org (#488)
For details on the new PyPI, see the blog post:

https://pythoninsider.blogspot.ca/2018/04/new-pypi-launched-legacy-pypi-shutting.html
2018-08-28 12:52:32 +01:00
Eli Treuherz
7f3fb65346 Change my email in the README (#483)
Would prefer my personal email here. I realise it's still in the git log but c'est la vie.
2018-08-28 09:56:55 +01:00
Jelle Zijlstra
a37abdcbc5
change some numeric behavior (#469) 2018-08-23 11:55:29 -07:00
Zsolt Dollenstein
c67feaf04f add changelog entry for #468 2018-08-23 12:55:04 +01:00
Jelle Zijlstra
8b340e2102
wrap atoms in invisible parens to split adjacent strings (#463) 2018-08-21 21:10:59 -07:00
Jelle Zijlstra
b719d85ccc
autodetect Python 3.6 on the basis of underscores (#461) 2018-08-19 21:02:06 -07:00
Łukasz Langa
0c77c58722 committers += jelle 2018-08-18 14:01:57 -07:00
Łukasz Langa
0bf683a659 PyPI downloads badge 2018-08-17 10:59:32 -07:00
Łukasz Langa
b7e216f554 Update README with missing change log, etc. 2018-08-17 10:13:19 -07:00
David Hotham
3fb4516872 Remove mappings from Vim plugin. (#417)
They clashed with standard mappings.  Simplest just to let users define
their own.

Fixes #415
2018-08-17 16:45:47 +01:00
Benjamin Wohlwend
450983e333 added instructions for PyCharm File Watcher setup (#418)
* added instructions for PyCharm File Watcher setup

With these steps, PyCharm will run black on every file save.

* Update README.md
2018-08-17 16:44:55 +01:00
José Padilla
1e56d02cad Add playground link (#437) 2018-08-17 16:36:57 +01:00
hauntsaninja
9c8caecdd6 Use atom-black plugin for Atom integration (#456) 2018-08-17 16:25:47 +01:00
Zsolt Dollenstein
e94a41f92a Look at actual parenthesis when generating ignored leafs.
Fixes #385
2018-07-22 15:30:02 +01:00
Zsolt Dollenstein
3316dce22d add change log entry 2018-07-02 18:02:13 +01:00
David Szotten
579a8f9344 Suggest BufWritePre instead of BufWritePost for vi (#376)
closes #321
2018-06-23 00:56:05 -07:00
Łukasz Langa
d93e726806 Don't freeze when multiple comments directly precede # fmt: off
Fixes #371
2018-06-21 14:03:01 -07:00
Łukasz Langa
2dfa69bb7f Stop Click from crashing Black on invalid environments
Fixes #277
2018-06-19 22:55:57 -07:00
Łukasz Langa
e1ef57a29e Move INDENT value to the postponed prefix
This makes blib2to3's tree output valid again (which was broken by the previous
fiddling with INDENT and DEDENT nodes).

Fixes #334
2018-06-19 20:44:47 -07:00
Łukasz Langa
df2ae3bbe6 Use the separate pass for # fmt: off on all code
This removes the hacky exception-based handling that didn't work across
statement boundaries.

Fixes #335
2018-06-19 17:32:41 -07:00
Łukasz Langa
8a8c58252c Support # fmt: off/on pairs within brackets
Fixes #329
2018-06-18 22:37:46 -07:00
Łukasz Langa
013cb2b374 Update README with missing fixes in Change Log 2018-06-18 22:37:46 -07:00
Rupert Bedford
d6872cdf87 Add pyls-black to README (#361) 2018-06-16 13:14:51 -07:00
Mariatta
af8fd24068 Add code snippet for using black badge in .rst (#356) 2018-06-15 15:12:16 -07:00
Katrin Leinweber
7462ef3ea6 Harmonise with other instances (#347) 2018-06-13 11:49:47 -07:00
Joseph Larson
fb34c9e195 Remove reference to deprecated Visual Studio Code extension (#343) 2018-06-12 13:36:55 -07:00
Zsolt Dollenstein
efcd039482 Fix string normalization eating all backslashes above 3 2018-06-10 09:44:41 +01:00
Łukasz Langa
2228890d62 Cache child sibling lookups
Removes catastrophically quadratic behavior on nodes with very many siblings.
2018-06-09 18:52:46 -07:00
Łukasz Langa
d240ca25ea Make is_complex_subscript() ignore list literals
This fixes catastrophically quadratic behavior on long lists.
2018-06-09 16:04:09 -07:00
Zsolt Dollenstein
5d0a469e8e Fix string normalization sometimes producing invalid fstrings (#327) 2018-06-09 12:30:49 -07:00
Łukasz Langa
5623581e09 Update README with missing Change Log entries 2018-06-08 12:05:44 -07:00
Łukasz Langa
8482d38fb4 Return early from comment placement calculation on lines without comments 2018-06-08 12:00:53 -07:00
Zsolt Dollenstein
7f3678885f fix handling of empty triple quoted strings (#314) 2018-06-07 11:41:34 -07:00
Łukasz Langa
82d09eda09 Fix link 2018-06-06 17:29:31 -07:00
Łukasz Langa
7ba4725993 Trim TOC to fit in two lines again 2018-06-06 17:07:07 -07:00
Łukasz Langa
489d00ed8f Support pyproject.toml
Fixes #65
2018-06-06 17:02:10 -07:00
Łukasz Langa
92a150d9e4 Fix improper unmodified file caching when -S was used
This will also future-proof the cache to changes to FileMode.
2018-06-06 15:46:30 -07:00
Matthew Walster
e5f5d54a22 vim: add "--skip-string-normalization" support (#310)
Since 18.6b0 was released, there has been a new option to skip string
normalization when Black is called, but it wasn't able to be specified
from within the vim plugin. This commit adds that functionality.

Tested with g:black_skip_string_normalization set to 0 (off) and 1 (on).
2018-06-06 15:45:17 -07:00
Brett Cannon
4ad7c9c107 List the Python extension for VS Code as an editor integration (#308) 2018-06-06 15:40:44 -07:00
Hugo
9e9ee449b4 Link to GitHub + HTTPS + typos (#303)
* Link to GitHub, update 3.6 minor version

* http -> https

* Fix typos

* The Black style for Black, the project, is italics
2018-06-06 09:50:08 -07:00
Peter Bengtsson
8406fcd9af correct email for Peter Bengtsson (#302) 2018-06-05 17:48:53 -07:00
Łukasz Langa
26b92e66ac acks += beterbe 2018-06-05 10:10:15 -07:00
Łukasz Langa
ed50737290 18.6b1 2018-06-05 09:49:06 -07:00
Łukasz Langa
d638d56e0e Fix unnecessary parentheses when a line contains multiline strings
Fixes #232
2018-06-04 21:27:51 -07:00
Łukasz Langa
23a00f0515 Fix long trivial assignments being wrapped in unnecessary parentheses
Fixes #273
2018-06-04 20:24:50 -07:00
Łukasz Langa
728e5a2f1e Properly format unified diff
Previously we weren't using timestamps.
2018-06-04 18:07:03 -07:00
Zsolt Dollenstein
00a302560b Preserve line endings when formatting a file in place (#288) 2018-06-04 15:52:06 -07:00
Łukasz Langa
4c352ad4be Add --verbose and report excluded paths in it, too
Fixes #283
2018-06-04 12:09:18 -07:00
Anthony Sottile
ecb3d8c472 python_version => language_version (#296)
Noticed this in `pytest`'s config -- `python_version` isn't a thing :D
2018-06-03 11:46:59 -07:00
Łukasz Langa
435aa7ac4a Reorder command-line options 2018-05-31 19:24:09 -07:00
Mika⠙
51756a405c Added --include and --exclude cli options (#281)
These 2 options allow you to pass in regular expressions that determine
whether files/directories are included or excluded in the recursive file
search.

Fixes #270
2018-05-31 17:51:15 -07:00
Łukasz Langa
1b189f6cde acks += Stavros; document fix, add to Pipfile 2018-05-31 10:53:26 -07:00
Łukasz Langa
8ebbd26888 Add --skip-string-normalization
Fixes #118
2018-05-30 12:56:16 -07:00
LukasDrude
608019dffb Improve doc regarding PyCharm keyboard shortcut (#271) 2018-05-29 14:50:15 -07:00
Łukasz Langa
b2067aabbf 18.5b1 2018-05-29 02:07:09 -07:00
Łukasz Langa
059cb12270 Change minor whitespace in "Usage" 2018-05-29 02:04:57 -07:00
Łukasz Langa
ad01a51868 Mention fix for #196 in the README 2018-05-29 01:12:16 -07:00
Łukasz Langa
2057bf6fae Clean up PEP 257 support
I documented the new behavior, added it to the change log, greatly expanded
tests, added support for inner defs and classes, and added Luka to ACKS.

Fixes #196
2018-05-29 00:47:52 -07:00
Łukasz Langa
6d924b01e4 Reword isort configuration, add --combine-as 2018-05-28 23:16:01 -07:00
Jason Friedland
d320e283aa Add isort args to README (#268) 2018-05-28 23:06:02 -07:00
Mahmoud Hossam
fd9bd07fe5 Add instructions for running Black on save in Vim (#255) 2018-05-26 13:01:17 -07:00
Łukasz Langa
bbed104e6d Reword --pyi and --py36 documentation 2018-05-23 11:52:41 -07:00
Carl Meyer
230f1d277c
Update changelog for PR 249. 2018-05-23 12:13:13 -06:00
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
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
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
96e68f0341 Report progress on multiple files incrementally 2018-05-16 11:45:32 -07:00