From e2dba3ec251e171533fe36544038f8957bf8644f Mon Sep 17 00:00:00 2001 From: albags Date: Mon, 22 Jul 2024 13:57:34 +0100 Subject: [PATCH] Update interactive_upload.py Delete code duplication for listing the files in the directory. --- interactive_upload.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/interactive_upload.py b/interactive_upload.py index fad7e1c..8c53fcc 100644 --- a/interactive_upload.py +++ b/interactive_upload.py @@ -90,11 +90,6 @@ def display_menu(): break print("Invalid directory. Please try again.") - files = [ - os.path.join(directory_path, f) - for f in os.listdir(directory_path) - if os.path.isfile(os.path.join(directory_path, f)) - ] directory_path = pathlib.Path(directory_path) files = list(directory_path.rglob(f"*{extension}"))