Commit Graph

365 Commits

Author SHA1 Message Date
Hugo van Kemenade
435dc7d995
Fix typos (#1423) 2020-05-17 07:17:31 -07:00
Richard Si
12e857f24c
Document git's ignore-revs-file feature (#1419)
* Document git's ignore-revs-file feature

A long-standing counterargument against moving to automated code formatters
like Black is that the migration will clutter up the output of git blame.
This used to be a valid argument, but not anymore. Since git version 2.23,
git natively supports ignoring revisions in blame with the --ignore-rev
and --ignore-revs-file options.

This isn't documented in the Black documentation. It should be as it would
put old projects wanting to migrate to Black at ease since blame won't
be ruined.

* Add links so people can +1 on --ignore-revs-file support

* Fix wording

'Counterargument' was the wrong word since it means an objection to an objection. 'Argument' is the proper word I was looking for.

Co-authored-by: Cooper Lees <me@cooperlees.com>
2020-05-16 13:22:46 -07:00
Richard Si
97060a4f18
Expand docs about slice formatting (#1418)
Black will apply no spaces around ':' operators for 'simple' expresssions
, but will apply extra space around ':' operators for 'complex' expressions.
Black treats anything more than variable names as 'complex', but this isn't
noted in the Black documentation. Which leads to a few issues on the GitHub
issue tracker that all report inconsistent spacing around ':' operators.
2020-05-16 10:21:31 +01:00
Sanket Dasgupta
f6393a20fc
Add preference of parantheses over backslashes in docs (#1399)
Closes https://github.com/psf/black/issues/392

Revived from https://github.com/psf/black/pull/558

Relevant to https://github.com/psf/black/issues/664
2020-05-09 06:32:29 -07:00
Hugo van Kemenade
4501f22fcb
README/CHANGES: Fix links (#1397)
* Replace relative README links with absolutes, so they work on PyPI

* CHANGES: Fix Spyder web link
2020-05-08 12:14:27 -07:00
shaoran
0721f11731
Adding documentation to the README for import errors in vim (#1317)
* Adding documentation to the README for import errors in vim

I had the same issue as psf/black#1148 and have been searching for a
solution to this. I realized that you cannot fix it by change anything
in the code, but by re-compiling the C extensions of regex and
typed-ast. Installing this packages from the tarballs solves the
problem.

* Fixing a bad copy&paste

Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>

* chore: changed made by pre-commit

* chore: better way of dealing with non-binary installs

* chore: adding vim cache files to the ignore list

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-05-08 08:42:19 -07:00
Dan Davison
2da2c15b21
Add purcell/reformatter.el as an Emacs integration option (#1330) 2020-05-08 16:31:06 +01:00
Jelle Zijlstra
702e459176
Update changelog and README (#1392)
* add two CHANGELOG entries

* update README on command-line options
2020-05-08 07:55:57 -07:00
Hugo van Kemenade
8e38b6626b
Remove deprecated --py36 option (#1236) 2020-05-08 07:47:54 -07:00
Richard Si
8c3c190f99
Add Black compatible configurations in documentation (#1366 & #1205) (#1371)
* Add Black compatible configs in docs ( #1366 & #1205)

When users of Black are starting a new project or are adding Black to their
existing projects, they will usually have to config their existing tools like
flake8 to be compatible with Black. Usually, these configs are the same across
different projects. Yet, there isn't any consolidated infomation on what configs
are compatible. Leaving users of Black to dig out any infomation they can find
in README.md.

* Fix a bad max-line-length value

* Clean up pylint's configs

* Add explanations for each configurations

Copying and pasting code without understanding it is a bad idea. This goes the same
for users copying and pasting configurations.

* Capitalize Pylint

* Link from the README

* Fix the isort configuration

I referenced the wrong source. I used a pesonal configuration, not a pure Black-
compatible configuration.

* Improve the config explanations

The explanation for the isort configuration was pretty bad. After having fixed the
configuration (see commit 01c55d1), improving the its explanation was necessary to
make it more user-friendly and understandable. Also added fenced code blocks of the
raw configuration options so the explanations make sense.

* Improve README wording slightly

* Add @hugovk, @JelleZijlstra + my suggestions

Co-authored-by: Cooper Lees <cooper@fb.com>
2020-05-08 07:26:29 -07:00
Arnav Borborah
6695fd892f
Include an easier way to integrate black with Pycharm (#1268)
* Include an easier way to integrate black with Pycharm
2020-05-08 15:13:57 +01:00
utsav-dbx
4041c560ec
Add Dropbox as a user of Black (#1335) 2020-05-08 15:23:22 +02:00
shaoran
8126b4f6a9
Fixing the documentation of how to install the vim plugin (#1318)
* fix: Fixing the documentation of how to install the vim plugin

Solves the installation problem that currently exist because
the current master branch is not stable. See psf/black#1304 for
more information.

* fix: fixing incorrect path
2020-04-23 19:32:40 -07:00
Quentin Pradet
7e4c6bf71f
Add missing separator in README (#1320) 2020-03-27 10:28:10 -07:00
Max Smolens
729f2d8caf
Fix typo in README (#1306) 2020-03-12 19:42:17 +00:00
Abdur-Rahmaan Janhangeer
5fc9f2baab
[README.md] Updated Mail Address - Abdur-Rahmaan Janhangeer (#1301) 2020-03-09 14:38:54 +01:00
Łukasz Langa
e253f1260d
Introduce a section of docs about exceptions 2020-03-04 22:26:45 +01:00
Łukasz Langa
c3589afa3d
Add @cooperlees to maintainers
Fixes #1295
2020-03-04 16:57:24 +01:00
Łukasz Langa
5b6f61e765
Tell people where Change Log went 2020-03-04 16:46:20 +01:00
Cooper Lees
d29303c988
Split out Change Log (#1117)
* Split out Change Log
- Move to CHANGES.md to allow bots to see changes
- MANIFEST.in already includes *.md so CHANGES.md will be included
- THis maintains format but the change log will now be after acknowledgements
- This also ensure this gets added to pypi.org via setup.py function
2020-03-04 16:40:48 +01:00
Shinya Fujino
383857273c Update README.md to include appropriate command to install Vim with Python 3 on macOS (#1247)
* Update README.md to include appropriate command to install Vim with Python 3 on macOS

* Run pre-commit hooks
2020-01-26 13:31:49 +00:00
Yazdan
915ebfcf7c change pyproject.toml relative path to absolute path in README.md (#1152)
because in the readthedocs hosted version this pyproject.toml will route to readthedocs does not exist page
2020-01-18 07:19:54 -08:00
Francisco
ac10ca8e60 Add Thonny-black-code-format plugin (#1195) 2019-12-08 10:13:50 -08:00
Cooper Lees
b69bce860c Add GitHub Actions badge to README.md (#1134) 2019-12-04 00:33:25 -08:00
Zsolt Dollenstein
b7624cedb9
Fix list literal example in README
The literal as written is going to be exploded because of the trailing comma.
2019-11-30 11:16:33 +00:00
springstan
5e9244ea0d Add Home Assistant to 'Used by' section (#1182)
See the following post: https://developers.home-assistant.io/blog/2019/07/31/black.html
2019-11-29 06:19:36 -08:00
Anthony Sottile
fa1163545f Suggest extend-ignore over ignore for flake8 (#1165)
this option was introduced in flake8 3.7.x and is generally preferred over `ignore` (which unsets all default ignores)
2019-11-22 08:13:23 +00:00
Richard Fearn
9b484d1bcc Remove duplicate paragraph about blackd headers (#1124) 2019-10-30 17:20:27 -07:00
Thomas Grainger
12826f3c1e replace broken rtfd pypi badge (#1120) 2019-10-30 07:27:20 -07:00
Łukasz Langa
f2203a77c5
acks += llchan 2019-10-28 20:58:06 +01:00
Joe Antonakakis
df6e1a41f7 Add diff support to blackd (#969) 2019-10-28 14:25:26 +01:00
Łukasz Langa
4b8669f502
Put missing contributors in the list (THANKS!) 2019-10-28 13:34:52 +01:00
Łukasz Langa
6864f111fc
Let readers know E203 and W503 are explained later 2019-10-28 13:21:30 +01:00
Łukasz Langa
c336b08bff
Put missing features and fixes in the change log 2019-10-28 13:12:58 +01:00
Yngve Høiseth
a6d866990e Automatic markdown and YAML formatting with Prettier (#874) 2019-10-21 11:42:46 +02:00
Asger Hautop Drewsen
4bcae4cf83 Use better default venv dir when using neovim (#937) 2019-10-20 16:43:02 +02:00
Andrew Thorp
893dd952a5 Update README.md (#906)
Add Kakoune integration instructions
2019-10-20 16:26:17 +02:00
Florent Thiery
84e22b75c6 add instructions to Readme for installing vim plugin using vim native package loading, and how to map a key to run it manually (#944) 2019-10-20 16:07:07 +02:00
Linus Groh
73bd7038fb Add black version header to blackd responses (#1046) 2019-10-13 11:35:31 -07:00
Hugo van Kemenade
faaa2c8d59 Used by: add pandas and Pillow (#1057) 2019-10-10 20:19:43 -07:00
vezeli
c4d2db4323 Change variable in README according to the PEP8 (#1002)
* Change variable in README according to the PEP8
* Change variable in tests according to the PEP8
2019-09-04 09:11:07 +01:00
Zsolt Dollenstein
720dd415f7 add change log entry 2019-07-28 16:22:17 +01:00
Mariatta
eb5f84eb8c Fix Travis CI badge (#939)
It should point to travis-ci.com instead of .org
2019-07-24 18:09:55 -07:00
Asger Hautop Drewsen
235a0b5bcb Change repo name to psf/black in README (#938) 2019-07-24 17:54:05 +01:00
Zsolt Dollenstein
77b6ed1b70 Hello github.com/psf! 2019-07-22 21:41:45 +01:00
Juan Luis Cano Rodríguez
7c556faf5f Ignore broken E203 (#910)
See https://github.com/python/black/issues/565
2019-06-25 07:27:02 -07:00
Adam Johnson
1fbf7251cc Add W503 to default flake8 ignore list (#894)
W503 and W504 are mutually exclusive, to do with splitting binary operators across lines. Black reformats code according to W504, putting the operator on the start of the newline, therefore W503 needs to be ignored in the suggested Flake8 config to use with Black.
2019-06-16 08:39:03 -07:00
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