diff options
author | deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> | 2020-07-17 07:35:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-17 07:35:22 +0000 |
commit | 7a12cab28144e0b743a121878f40f263867d3670 (patch) | |
tree | 437dda135f9286c4f06c10acf5db508e3558e419 | |
parent | 9d12eb5567a1a36afe03da594ea0f94c36efa729 (diff) | |
download | isort-deepsource-fix-e83466ec.tar.gz |
Remove length check in favour of truthiness of the objectdeepsource-fix-e83466ec
-rw-r--r-- | isort/parse.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/isort/parse.py b/isort/parse.py index a67ae1e9..283d09a7 100644 --- a/isort/parse.py +++ b/isort/parse.py @@ -371,7 +371,7 @@ def file_contents(contents: str, config: Config = DEFAULT_CONFIG) -> ParsedConte categorized_comments["above"]["from"].setdefault(import_from, []).insert( 0, out_lines.pop(-1) ) - if len(out_lines): + if out_lines: last = out_lines[-1].rstrip() else: last = "" |