From 95de3e3cb03ac4a5dadd511dd406a194b8b326d5 Mon Sep 17 00:00:00 2001 From: jpy-git Date: Wed, 16 Mar 2022 10:35:59 +0000 Subject: [PATCH 1/5] Update pylint config docs --- CHANGES.md | 3 +- docs/compatible_configs/pylint/pylintrc | 3 -- docs/compatible_configs/pylint/pyproject.toml | 3 -- docs/compatible_configs/pylint/setup.cfg | 3 -- docs/guides/using_black_with_other_tools.md | 31 ++----------------- 5 files changed, 3 insertions(+), 40 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index edca0dcdad4..62719014067 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -29,8 +29,7 @@ ### Documentation - +- Update pylint config documentation (#2931) ### Integrations diff --git a/docs/compatible_configs/pylint/pylintrc b/docs/compatible_configs/pylint/pylintrc index 7abddd2c330..e863488dfbc 100644 --- a/docs/compatible_configs/pylint/pylintrc +++ b/docs/compatible_configs/pylint/pylintrc @@ -1,5 +1,2 @@ -[MESSAGES CONTROL] -disable = C0330, C0326 - [format] max-line-length = 88 diff --git a/docs/compatible_configs/pylint/pyproject.toml b/docs/compatible_configs/pylint/pyproject.toml index 49ad7a2c771..ef51f98a966 100644 --- a/docs/compatible_configs/pylint/pyproject.toml +++ b/docs/compatible_configs/pylint/pyproject.toml @@ -1,5 +1,2 @@ -[tool.pylint.messages_control] -disable = "C0330, C0326" - [tool.pylint.format] max-line-length = "88" diff --git a/docs/compatible_configs/pylint/setup.cfg b/docs/compatible_configs/pylint/setup.cfg index 3ada24530ea..0b754cdc0f0 100644 --- a/docs/compatible_configs/pylint/setup.cfg +++ b/docs/compatible_configs/pylint/setup.cfg @@ -1,5 +1,2 @@ [pylint] max-line-length = 88 - -[pylint.messages_control] -disable = C0330, C0326 diff --git a/docs/guides/using_black_with_other_tools.md b/docs/guides/using_black_with_other_tools.md index bde99f7c00c..6daa0af08a9 100644 --- a/docs/guides/using_black_with_other_tools.md +++ b/docs/guides/using_black_with_other_tools.md @@ -210,31 +210,13 @@ mixed feelings about _Black_'s formatting style. #### Configuration ``` -disable = C0326, C0330 max-line-length = 88 ``` #### Why those options above? -When _Black_ is folding very long expressions, the closing brackets will -[be dedented](../the_black_code_style/current_style.md#how-black-wraps-lines). - -```py3 -ImportantClass.important_method( - exc, limit, lookup_lines, capture_locals, callback -) -``` - -Although this style is PEP 8 compliant, Pylint will raise -`C0330: Wrong hanging indentation before block (add 4 spaces)` warnings. Since _Black_ -isn't configurable on this style, Pylint should be told to ignore these warnings via -`disable = C0330`. - -Also, since _Black_ deals with whitespace around operators and brackets, Pylint's -warning `C0326: Bad whitespace` should be disabled using `disable = C0326`. - -And as usual, Pylint should be configured to only complain about lines that surpass `88` -characters via `max-line-length = 88`. +Pylint should be configured to only complain about lines that surpass `88` characters +via `max-line-length = 88`. #### Formats @@ -242,9 +224,6 @@ characters via `max-line-length = 88`. pylintrc ```ini -[MESSAGES CONTROL] -disable = C0326, C0330 - [format] max-line-length = 88 ``` @@ -257,9 +236,6 @@ max-line-length = 88 ```cfg [pylint] max-line-length = 88 - -[pylint.messages_control] -disable = C0326, C0330 ``` @@ -268,9 +244,6 @@ disable = C0326, C0330 pyproject.toml ```toml -[tool.pylint.messages_control] -disable = "C0326, C0330" - [tool.pylint.format] max-line-length = "88" ``` From 5d87d2532af7a1d65958b49d3cd945273d579891 Mon Sep 17 00:00:00 2001 From: Joseph Young <80432516+jpy-git@users.noreply.github.com> Date: Wed, 16 Mar 2022 13:02:08 +0000 Subject: [PATCH 2/5] Re-add changelog comment --- CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 62719014067..36f4a7839be 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -29,6 +29,9 @@ ### Documentation + + - Update pylint config documentation (#2931) ### Integrations From 0ee84d867dde9954974bba28accebbc90d38e2f8 Mon Sep 17 00:00:00 2001 From: Joseph Young <80432516+jpy-git@users.noreply.github.com> Date: Wed, 16 Mar 2022 13:37:59 +0000 Subject: [PATCH 3/5] Update CHANGES.md --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 36f4a7839be..e4fda9ba878 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -30,7 +30,7 @@ ### Documentation + don't need a changelog entry. --> - Update pylint config documentation (#2931) From bfbd331ac224b7f71c13ae5cbd5f4d800fb06c3d Mon Sep 17 00:00:00 2001 From: jpy-git Date: Wed, 16 Mar 2022 14:11:18 +0000 Subject: [PATCH 4/5] Add callout to old pylint error codes --- CHANGES.md | 2 +- docs/guides/using_black_with_other_tools.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index e4fda9ba878..9ffc2c1ea9f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -31,7 +31,7 @@ - + - Update pylint config documentation (#2931) ### Integrations diff --git a/docs/guides/using_black_with_other_tools.md b/docs/guides/using_black_with_other_tools.md index 6daa0af08a9..a2cfc90a250 100644 --- a/docs/guides/using_black_with_other_tools.md +++ b/docs/guides/using_black_with_other_tools.md @@ -218,6 +218,9 @@ max-line-length = 88 Pylint should be configured to only complain about lines that surpass `88` characters via `max-line-length = 88`. +If using `pylint<2.6.0`, also disable `C0326` and `C0330` as these are incompatible with +_Black_ formatting and have since been deprecated. + #### Formats
From 26afea2aef718c88b090fe4ded80134ca42b39f1 Mon Sep 17 00:00:00 2001 From: Joseph Young <80432516+jpy-git@users.noreply.github.com> Date: Wed, 16 Mar 2022 16:59:08 +0000 Subject: [PATCH 5/5] Update docs/guides/using_black_with_other_tools.md Co-authored-by: Jelle Zijlstra --- docs/guides/using_black_with_other_tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/using_black_with_other_tools.md b/docs/guides/using_black_with_other_tools.md index a2cfc90a250..1d380bdaba7 100644 --- a/docs/guides/using_black_with_other_tools.md +++ b/docs/guides/using_black_with_other_tools.md @@ -219,7 +219,7 @@ Pylint should be configured to only complain about lines that surpass `88` chara via `max-line-length = 88`. If using `pylint<2.6.0`, also disable `C0326` and `C0330` as these are incompatible with -_Black_ formatting and have since been deprecated. +_Black_ formatting and have since been removed. #### Formats