From c73da7ad8db6f89c2f3547689380d54bdc256d4f Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Wed, 27 Jan 2021 04:17:38 +0000 Subject: [PATCH] Refactor unnecessary `else` / `elif` when `if` block has a `continue` statement --- file_rename.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/file_rename.py b/file_rename.py index 5814e8d..1c6ee71 100644 --- a/file_rename.py +++ b/file_rename.py @@ -40,10 +40,8 @@ # Skip the header lines if line.startswith('#'): continue - # Split the two columns, then write to key & value - else: - names = line.strip().split() - file_data[names[0]] = names[1] + names = line.strip().split() + file_data[names[0]] = names[1] except IOError as ex: print("File open issue: " + ex.strerror)