Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regressions for black #2339

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/unit/profiles/test_black.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,8 @@ def sub(a: np.ndarray, b: np.ndarray) -> np.ndarray: ...

def test_black_trailing_comma():
black_test(
"from x import (a, b, c,)\n",
"""\
"from x import (a, b, c,)\n",
"""\
from x import (
a,
b,
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/test_regressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ def test_comments_should_cause_wrapping_on_long_lines_black_mode_issue_1219():
""",
show_diff=True,
profile="black",
split_on_trailing_comma=False,
)


Expand Down Expand Up @@ -663,7 +664,7 @@ def test_isort_doesnt_misplace_comments_issue_1431():
MyLovelyCompanyTeamProjectComponent as component, # DRY
)
"""
assert isort.code(input_text, profile="black") == input_text
assert isort.code(input_text, profile="black", split_on_trailing_comma=False) == input_text


def test_isort_doesnt_misplace_add_import_issue_1445():
Expand Down Expand Up @@ -1504,6 +1505,7 @@ def test_isort_adding_second_comma_issue_1621():
""",
profile="black",
show_diff=True,
split_on_trailing_comma=False,
)
assert (
isort.code(
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_ticketed_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ def test_isort_intelligently_places_noqa_comments_issue_1456():
"test_scan_static_reflection_predictor import ( # noqa: F401\n"
" data as static_test,\n)\n",
profile="black",
split_on_trailing_comma=False,
show_diff=True,
)

Expand Down
Loading