Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycrosley committed Jul 11, 2020
1 parent 90617aa commit c7ea8ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion isort/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def _sort_imports(
else:
stripped_line = line.strip()
if stripped_line and not line_separator:
line_separator = line[len(line.rstrip()):]
line_separator = line[len(line.rstrip()) :]

for file_skip_comment in FILE_SKIP_COMMENTS:
if file_skip_comment in line:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_regressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ def test_windows_newline_issue_1277():
See: https://github.com/timothycrosley/isort/issues/1277
"""
assert (
isort.code("\ndef main():\r\n import time\r\n\n import sys\r\n") ==
"\ndef main():\r\n import sys\r\n import time\r\n"
isort.code("\ndef main():\r\n import time\r\n\n import sys\r\n")
== "\ndef main():\r\n import sys\r\n import time\r\n"
)


Expand Down

0 comments on commit c7ea8ec

Please sign in to comment.