X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/fa7f01592b02229ff47f3bcab39a9b7d6c59f07c..f99ef6e190785b3e6a58e83f1382e7d6d3c4881e:/docs/guides/using_black_with_other_tools.md?ds=sidebyside diff --git a/docs/guides/using_black_with_other_tools.md b/docs/guides/using_black_with_other_tools.md index 1d380bd..22c641a 100644 --- a/docs/guides/using_black_with_other_tools.md +++ b/docs/guides/using_black_with_other_tools.md @@ -51,9 +51,9 @@ line_length = 88 #### Why those options above? -_Black_ wraps imports that surpass `line-length` by moving identifiers into their own -indented line. If that still doesn't fit the bill, it will put all of them in separate -lines and put a trailing comma. A more detailed explanation of this behaviour can be +_Black_ wraps imports that surpass `line-length` by moving identifiers onto separate +lines and by adding a trailing comma after each. A more detailed explanation of this +behaviour can be [found here](../the_black_code_style/current_style.md#how-black-wraps-lines). isort's default mode of wrapping imports that extend past the `line_length` limit is @@ -173,7 +173,7 @@ limit of `88`, _Black_'s default. This explains `max-line-length = 88`. ```ini [flake8] max-line-length = 88 -extend-ignore = E203 +extend-ignore = E203, E704 ``` @@ -252,3 +252,35 @@ max-line-length = "88" ``` + +### pycodestyle + +[pycodestyle](https://pycodestyle.pycqa.org/) is also a code linter like Flake8. + +#### Configuration + +``` +max-line-length = 88 +ignore = E203 +``` + +#### Why those options above? + +pycodestyle should be configured to only complain about lines that surpass `88` +characters via `max_line_length = 88`. + +See +[Why are Flake8’s E203 and W503 violated?](https://black.readthedocs.io/en/stable/faq.html#why-are-flake8-s-e203-and-w503-violated) + +#### Formats + +
+setup.cfg + +```cfg +[pycodestyle] +ignore = E203 +max_line_length = 88 +``` + +