From cbf6ba7a1fcdf5ac7492adb2137bd646f9a27d81 Mon Sep 17 00:00:00 2001 From: Timothy Crosley Date: Thu, 4 Apr 2019 21:07:11 -0700 Subject: Fix issue #916 --- isort/isort.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1