summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2019-04-04 21:07:11 -0700
committerTimothy Crosley <timothy.crosley@gmail.com>2019-04-04 21:07:11 -0700
commitcbf6ba7a1fcdf5ac7492adb2137bd646f9a27d81 (patch)
tree0f75ebe500f9366c86a2413bc986b3fde48210ad
parentd0aba7f632a9f117fc10c03970e08c12b828a77a (diff)
downloadisort-feature/fix-issue-916.tar.gz
Fix issue #916feature/fix-issue-916
-rw-r--r--isort/isort.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/isort/isort.py b/isort/isort.py
index 5757c009..7609648e 100644
--- a/isort/isort.py
+++ b/isort/isort.py
@@ -884,7 +884,7 @@ class SortImports(object):
self._in_top_comment = True
return True
elif self._in_top_comment:
- if not line.startswith("#"):
+ if not line.startswith("#") or line in self._section_comments:
self._in_top_comment = False
self._first_comment_index_end = self.index - 1