Skip to content

Commit

Permalink
docs: Black not installed by default
Browse files Browse the repository at this point in the history
  • Loading branch information
akaihola committed Dec 31, 2024
1 parent 0ef9c53 commit 772c3cb
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ How?

To install or upgrade, use::

pip install --upgrade darker~=2.1.1
pip install --upgrade darker[black]~=2.1.1

Or, if you're using Conda_ for package management::

conda install -c conda-forge darker~=2.1.1 isort
conda install -c conda-forge darker~=2.1.1 black isort
conda update -c conda-forge darker

..
Expand All @@ -146,6 +146,8 @@ Or, if you're using Conda_ for package management::
specifier for Darker. See `Guarding against Black compatibility breakage`_ for more
information.

*New in version 3.0.0:* Black is no longer installed by default.

The ``darker <myfile.py>`` or ``darker <directory>`` command
reads the original file(s),
formats them using Black_,
Expand Down Expand Up @@ -478,7 +480,7 @@ PyCharm/IntelliJ IDEA

1. Install ``darker``::

$ pip install darker
$ pip install 'darker[black]'

2. Locate your ``darker`` installation folder.

Expand Down Expand Up @@ -540,7 +542,7 @@ Visual Studio Code

1. Install ``darker``::

$ pip install darker
$ pip install 'darker[black]'

2. Locate your ``darker`` installation folder.

Expand Down Expand Up @@ -683,16 +685,20 @@ other reformatter tools you use to known compatible versions, for example:
Using arguments
---------------

You can provide arguments, such as enabling isort, by specifying ``args``.
Note the inclusion of the isort Python package under ``additional_dependencies``:
You can provide arguments, such as disabling Darker or enabling isort,
by specifying ``args``.
Note the absence of Black and the inclusion of the isort Python package
under ``additional_dependencies``:

.. code-block:: yaml
- repo: https://github.com/akaihola/darker
rev: v2.1.1
hooks:
- id: darker
args: [--isort]
args:
- --formatter=none
- --isort
additional_dependencies:
- isort~=5.9
Expand Down Expand Up @@ -779,6 +785,9 @@ The ``lint:`` option.
Removed the ``lint:`` option and moved it into the GitHub action
of the Graylint_ package.

*New in version 3.0.0:*
Black is now explicitly installed when running the action.


Syntax highlighting
===================
Expand Down

0 comments on commit 772c3cb

Please sign in to comment.