summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2019-12-23 02:02:08 -0800
committerTimothy Crosley <timothy.crosley@gmail.com>2019-12-23 02:02:08 -0800
commitce8a42f7e829109fec33239c36a31b31a961ad20 (patch)
tree65b292a1d1d3f6f01ec1bcaa1df8bdc4351278b8
parentf79b8834ff88b9f4517d464407240f2bce6c7f5a (diff)
downloadisort-ce8a42f7e829109fec33239c36a31b31a961ad20.tar.gz
Fix first comment identification
-rw-r--r--isort/api.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/isort/api.py b/isort/api.py
index 94fdd389..f866c058 100644
--- a/isort/api.py
+++ b/isort/api.py
@@ -175,7 +175,7 @@ def sort_imports(
if not line_separator:
line_separator = line[-1]
- if index == 1 and line.startswith("#"):
+ if index == 0 and line.startswith("#"):
in_top_comment = True
elif in_top_comment:
if not line.startswith("#") or line in section_comments: