Skip to content

Commit 380d7a2

Browse files
committed
Fix regressions for black
1 parent 1c8d963 commit 380d7a2

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

tests/unit/profiles/test_black.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,8 @@ def sub(a: np.ndarray, b: np.ndarray) -> np.ndarray: ...
447447

448448
def test_black_trailing_comma():
449449
black_test(
450-
"from x import (a, b, c,)\n",
451-
"""\
450+
"from x import (a, b, c,)\n",
451+
"""\
452452
from x import (
453453
a,
454454
b,

tests/unit/test_regressions.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ def test_comments_should_cause_wrapping_on_long_lines_black_mode_issue_1219():
408408
""",
409409
show_diff=True,
410410
profile="black",
411+
split_on_trailing_comma=False,
411412
)
412413

413414

@@ -663,7 +664,7 @@ def test_isort_doesnt_misplace_comments_issue_1431():
663664
MyLovelyCompanyTeamProjectComponent as component, # DRY
664665
)
665666
"""
666-
assert isort.code(input_text, profile="black") == input_text
667+
assert isort.code(input_text, profile="black", split_on_trailing_comma=False) == input_text
667668

668669

669670
def test_isort_doesnt_misplace_add_import_issue_1445():
@@ -1504,6 +1505,7 @@ def test_isort_adding_second_comma_issue_1621():
15041505
""",
15051506
profile="black",
15061507
show_diff=True,
1508+
split_on_trailing_comma=False,
15071509
)
15081510
assert (
15091511
isort.code(

tests/unit/test_ticketed_features.py

+1
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ def test_isort_intelligently_places_noqa_comments_issue_1456():
531531
"test_scan_static_reflection_predictor import ( # noqa: F401\n"
532532
" data as static_test,\n)\n",
533533
profile="black",
534+
split_on_trailing_comma=False,
534535
show_diff=True,
535536
)
536537

0 commit comments

Comments
 (0)