Skip to content

Commit

Permalink
Merge pull request #1931 from davidcollins001/main
Browse files Browse the repository at this point in the history
Split long cython import lines
  • Loading branch information
timothycrosley committed May 11, 2022
2 parents 2cb757e + 4833ab0 commit b9716d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion isort/wrap.py
Expand Up @@ -69,7 +69,7 @@ def line(content: str, line_separator: str, config: Config = DEFAULT_CONFIG) ->
comment = None
if "#" in content:
line_without_comment, comment = content.split("#", 1)
for splitter in ("import ", ".", "as "):
for splitter in ("import ", "cimport ", ".", "as "):
exp = r"\b" + re.escape(splitter) + r"\b"
if re.search(exp, line_without_comment) and not line_without_comment.strip().startswith(
splitter
Expand Down

0 comments on commit b9716d7

Please sign in to comment.