diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2019-12-12 18:19:25 -0800 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2019-12-12 18:19:25 -0800 |
commit | 2b3b1160f38c107e18b8c0b4190ee95ac710e7dd (patch) | |
tree | b786011ce7c5d24f2517194a244e88f22309cf59 | |
parent | 2918467ab222eca219460f819168d97b95b32167 (diff) | |
download | isort-2b3b1160f38c107e18b8c0b4190ee95ac710e7dd.tar.gz |
Move over identifier, cast boolean
-rw-r--r-- | isort/api.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/isort/api.py b/isort/api.py index b102af69..000314bf 100644 --- a/isort/api.py +++ b/isort/api.py @@ -14,6 +14,8 @@ from .format import remove_whitespace, show_unified_diff from .io import File from .settings import DEFAULT_CONFIG, FILE_SKIP_COMMENT, Config +IMPORT_START_IDENTIFIERS = ("from ", "from.import", "import ", "import*") + def _config( path: Optional[Path] = None, config: Config = DEFAULT_CONFIG, **config_kwargs @@ -164,7 +166,7 @@ def sort_imports( break char_index += 1 - not_imports = in_quote + not_imports = bool(in_quote) if not in_quote: stripped_line = line.strip() if not stripped_line or stripped_line.startswith("#"): |