diff options
author | Timothy Edmund Crosley <timothy.crosley@gmail.com> | 2015-01-17 19:04:19 -0500 |
---|---|---|
committer | Timothy Edmund Crosley <timothy.crosley@gmail.com> | 2015-01-17 19:04:19 -0500 |
commit | a235113ec20af57161a84a5caf59ba3d1250c235 (patch) | |
tree | 510c49bb277347e95a0b37608bac431a1c60ce15 | |
parent | 29a40260ff34589fa6ad3070bedaec3dedc9e5a4 (diff) | |
parent | a211c7a01fe3882561c2478be0cbb989da517ed7 (diff) | |
download | isort-a235113ec20af57161a84a5caf59ba3d1250c235.tar.gz |
Merge pull request #219 from helenst/isorting-isort
Prevent line containing isort:import tripping up over itself
-rw-r--r-- | isort/isort.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/isort/isort.py b/isort/isort.py index d7a3a71b..e9aa9e91 100644 --- a/isort/isort.py +++ b/isort/isort.py @@ -599,8 +599,8 @@ class SortImports(object): self.import_index = self.index - 1 continue - if "isort:imports-" in line: - section = line.split("isort:imports-")[-1].split()[0] + if "isort:" + "imports-" in line: + section = line.split("isort:" + "imports-")[-1].split()[0] self.place_imports[section.upper()] = [] self.import_placements[line] = section.upper() |