From 159370682b0d50cf3a706276a573ae52cac8d471 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Wed, 28 Feb 2024 10:45:39 +0300 Subject: [PATCH 1/2] `wemake` has 80 chars hard limit, not 79 Proof: - https://github.com/wemake-services/wemake-python-styleguide/blob/298721659dfdcb93144aff394576a04fdb5fd03e/setup.cfg#L20 - https://github.com/wemake-services/wemake-python-styleguide/actions/runs/8076865527/job/22066047320?pr=2864 --- isort/profiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isort/profiles.py b/isort/profiles.py index fe2aac492..cf43ac0f2 100644 --- a/isort/profiles.py +++ b/isort/profiles.py @@ -61,7 +61,7 @@ "multi_line_output": 3, "include_trailing_comma": True, "use_parentheses": True, - "line_length": 79, + "line_length": 80, } appnexus = { **black, From b553962bcf303f227c144ed5f7f0f4e233cbc09d Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Wed, 28 Feb 2024 10:47:53 +0300 Subject: [PATCH 2/2] Update test_wemake.py --- tests/unit/profiles/test_wemake.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/unit/profiles/test_wemake.py b/tests/unit/profiles/test_wemake.py index 123eef051..0d1594535 100644 --- a/tests/unit/profiles/test_wemake.py +++ b/tests/unit/profiles/test_wemake.py @@ -88,10 +88,22 @@ class _ClassVisitor(ast.NodeVisitor): ... def test_wemake_snippet_four(): - """80 line length should be fixed""" + """80 line length should not be fixed""" wemake_isort_test( """ from typing import Iterable, Iterator, Optional, Sequence, Tuple, TypeVar, Union +""", + """ +from typing import Iterable, Iterator, Optional, Sequence, Tuple, TypeVar, Union +""", + ) + + +def test_wemake_snippet_five(): + """81 line length should be fixed""" + wemake_isort_test( + """ +from typing import Iterable, Iterator, Optional, Sequence, Tuple, TypeVar, Union1 """, """ from typing import ( @@ -101,7 +113,7 @@ def test_wemake_snippet_four(): Sequence, Tuple, TypeVar, - Union, + Union1, ) """, )