Skip to content

Commit

Permalink
Avoid misidentifying a pure python cython import as a cimport. Fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
jtoledo1974 committed Dec 27, 2022
1 parent 6939a80 commit 9b37e89
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion isort/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,10 @@ def process(
or " cimport " in import_statement
or " cimport*" in import_statement
or " cimport(" in import_statement
or ".cimport" in import_statement
or (
".cimport" in import_statement
and "cython.cimports" not in import_statement
) # Allow pure python imports. See #2062
):
cimport_statement = True

Expand Down

0 comments on commit 9b37e89

Please sign in to comment.