Skip to content

Commit

Permalink
Add section on package management to README
Browse files Browse the repository at this point in the history
See #18 / #21 / #23.
  • Loading branch information
peterjc authored May 31, 2020
1 parent c473392 commit b2ddb59
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,28 @@ You can request only the ``BLK`` codes be shown using::

$ flake8 --select BLK example.py

Python package management
-------------------------

We covered using pip or conda by hand above. If you are using a PyPI based
Python dependency system like pipenv or poetry, you may run into complications
because at the time of writing all the black releases to PyPI have been tagged
as pre-releases (beta code). `PEP440 Handling of pre-releases
<https://www.python.org/dev/peps/pep-0440/#handling-of-pre-releases>`_
could be more explicit here.

For pipenv, flake8-black v0.2.0 onwards should just work.

For poetry, include this in your ``pyproject.toml`` configuration file::

[tool.poetry.dev-dependencies]
...
black = { version = "*", allow-prereleases = true }
...

In either case, for large projects you should consider pinning the exact
version of black you want to use as their updates do sometimes introduce
changes which would show up as new ``BLK100`` violations via flake8.

Configuration
-------------
Expand Down

0 comments on commit b2ddb59

Please sign in to comment.