diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2019-12-29 22:52:12 -0800 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2019-12-29 22:52:12 -0800 |
commit | c54b3dd4620f9b3e7ac127c583ecb029fb90f1b7 (patch) | |
tree | 80ced7283e6e43c6359e17ecb1b7bd536a562aca /isort | |
parent | 4edfd1d6c8ba741ac24594ff95847451b94db293 (diff) | |
download | isort-c54b3dd4620f9b3e7ac127c583ecb029fb90f1b7.tar.gz |
Fix support for multi-line comments ending in what appear to be comments
Diffstat (limited to 'isort')
-rw-r--r-- | isort/api.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/isort/api.py b/isort/api.py index 8d435b21..0aae7711 100644 --- a/isort/api.py +++ b/isort/api.py @@ -184,7 +184,7 @@ def sort_imports( in_top_comment = False first_comment_index_end = index - 1 - if not stripped_line.startswith("#") and '"' in line or "'" in line: + if (not stripped_line.startswith("#") or in_quote) and '"' in line or "'" in line: char_index = 0 if first_comment_index_start == -1 and ( line.startswith('"') or line.startswith("'") |