From 9bdc453b13d2ae7f4d763ed15955c8471c633857 Mon Sep 17 00:00:00 2001 From: Rohan Khanna Date: Thu, 15 Oct 2020 21:37:05 +0200 Subject: [PATCH] Unnecessary else / elif used after break (deepsource.io PYL-R1723) --- isort/output.py | 2 +- isort/parse.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/isort/output.py b/isort/output.py index f4b30304b..cda5c24d8 100644 --- a/isort/output.py +++ b/isort/output.py @@ -184,7 +184,7 @@ def sorted_imports( continue next_construct = line break - elif in_quote: + if in_quote: next_construct = line break diff --git a/isort/parse.py b/isort/parse.py index fe3dd157a..6a999391a 100644 --- a/isort/parse.py +++ b/isort/parse.py @@ -246,8 +246,8 @@ def file_contents(contents: str, config: Config = DEFAULT_CONFIG) -> ParsedConte if import_index >= line_count: break - else: - starting_line = in_lines[import_index] + + starting_line = in_lines[import_index] line, *end_of_line_comment = line.split("#", 1) if ";" in line: