From 917be504dde938f879b7793b393809221164daae Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 4 Jun 2021 17:03:57 +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)