Skip to content

Commit

Permalink
doc: add an isort section to CONTRIBUTING.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed May 16, 2020
1 parent ba5f6af commit 519e72a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,27 @@ error and warning list
blacklist a large number of the full list of rules that are checked by
``flake8`` by default.

Import statements order
-----------------------

We use ``isort`` to enforce PEP-8 recommandations over import order.
In decreasing priority order:
FUTURE > STDLIB > THIRD PARTY > FIRST PARTY (yt) > EXPLICITLY LOCAL

``isort`` can be installed via ``pip``

.. code-block:: bash
$ pip install isort
To validate import order, run ``isort`` recursively at the top level

.. code-block:: bash
$ isort -rc . --check-only
If any error is detected, rerun this without the ``--check-only`` flag to fix them.

Source code style guide
-----------------------

Expand Down

0 comments on commit 519e72a

Please sign in to comment.