summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <tcrosley@domaintools.com>2017-05-19 23:57:43 -0700
committerTimothy Crosley <tcrosley@domaintools.com>2017-05-19 23:57:43 -0700
commit3af3a6db8d8c53d7475e42a2d360ef4517bec69e (patch)
tree62e72e8529973ee3ab2da4827a49db365f922a27
parent6424c28a2818ecf0ccea0684f46a219da035abd8 (diff)
downloadisort-feature/fix-issue-432.tar.gz
-rw-r--r--isort/isort.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/isort/isort.py b/isort/isort.py
index c5290d58..a1f466c2 100644
--- a/isort/isort.py
+++ b/isort/isort.py
@@ -538,7 +538,7 @@ class SortImports(object):
section_title = self.config.get('import_heading_' + str(section_name).lower(), '')
if section_title:
section_comment = "# {0}".format(section_title)
- if not section_comment in self.out_lines[0:1]:
+ if not section_comment in self.out_lines[0:1] and not section_comment in self.in_lines[0:1]:
section_output.insert(0, section_comment)
output += section_output + ([''] * self.config['lines_between_sections'])