Skip to content

Commit

Permalink
Issue 933 reference isort settings (#936)
Browse files Browse the repository at this point in the history
* Fixed link to `isort.toml` in config docs

The link was supposed to point to `isort.toml`, but did actually point
to `flake8.toml`. This is fixed now.

* Updated docstring to reference `isort` settings

`isort` settings need to include `multi_line_output = 3` option to not
collide with WSP318. The docstring has been updated with a reference.

* Updated CHANGELOG

* Fixed which docstring is update

I messed up before and changed the docstring of WSP317 instead of 318.
This is fixed now.
  • Loading branch information
tbrlpld authored and sobolevn committed Oct 24, 2019
1 parent ade6fc1 commit 46a4341
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ We used to have incremental versioning before `0.1.0`.
- Replace `scripts/tokens.py` with an external tool
- Improves violation code testing
- Improves testing of `.. versionchanged` and `previous_codes` properties
- Reference `isort` settings requirement for compliance with WSP318 in docstring


## 0.12.5
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/usage/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ file is available with the core settings for ``flake8``.
We also use ``flake8-isort`` to style our imports.
You will need to update your configuration with the following lines:
Otherwise, your ``isort`` will complain about your imports.
Our `isort.toml <https://github.com/wemake-services/wemake-python-styleguide/blob/master/styles/flake8.toml>`_
Our `isort.toml <https://github.com/wemake-services/wemake-python-styleguide/blob/master/styles/isort.toml>`_
file is available with the core settings for ``isort``.

All recommended settings can be found in our `styleguide.toml <https://github.com/wemake-services/wemake-python-styleguide/blob/master/styles/styleguide.toml>`_.
Expand Down
8 changes: 8 additions & 0 deletions wemake_python_styleguide/violations/consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,14 @@ def test():
def test():
print('test')
This rule is consistent with the "Vertical Hanging Indent" option for
``multi_line_output`` setting of ``isort``. To avoid conflicting rules,
you should set ``multi_line_output = 3`` in the ``isort`` settings.
See also:
https://github.com/timothycrosley/isort#multi-line-output-modes
https://github.com/wemake-services/wemake-python-styleguide/blob/master/styles/isort.toml
.. versionadded:: 0.6.0
"""
Expand Down

0 comments on commit 46a4341

Please sign in to comment.