Skip to content

Commit afbe508

Browse files
committed
IMPROVEMENT: setup.py pylint fixes
1 parent 58cabf0 commit afbe508

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

setup.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,19 @@
5555
f"{PRJ_URL}/raw/master/images/App_screenshot1.png")
5656

5757
# So that the vehicle_templates directory contents get correctly read by the MANIFEST.in file
58-
source_dir = 'vehicle_templates'
59-
dest_dir = 'MethodicConfigurator/vehicle_templates'
58+
TEMPLATES_SRC_DIR = 'vehicle_templates'
59+
TEMPLATES_DST_DIR = 'MethodicConfigurator/vehicle_templates'
6060

61-
if os.path.exists(dest_dir):
62-
shutil.rmtree(dest_dir)
61+
if os.path.exists(TEMPLATES_DST_DIR):
62+
shutil.rmtree(TEMPLATES_DST_DIR)
6363

6464
try:
65-
shutil.copytree(source_dir, dest_dir)
65+
shutil.copytree(TEMPLATES_SRC_DIR, TEMPLATES_DST_DIR)
6666
print("Directory tree copied successfully.")
6767
except FileExistsError as e:
68-
print(f"The destination directory '{dest_dir}' already exists and cannot be overwritten.")
68+
print(f"The destination directory '{TEMPLATES_DST_DIR}' already exists and cannot be overwritten.")
6969
except PermissionError as e:
70-
print(f"Permission denied when trying to copy '{source_dir}' to '{dest_dir}'. Please check your permissions.")
70+
print(f"Permission denied when trying to copy '{TEMPLATES_SRC_DIR}' to '{TEMPLATES_DST_DIR}'. Please check your permissions.")
7171
except Exception as e: # pylint: disable=broad-except
7272
print(f"An unexpected error occurred while copying the directory tree: {e}")
7373

@@ -137,5 +137,5 @@
137137
)
138138

139139
# Remove the symbolic link now that the setup is done
140-
if os.path.exists(dest_dir):
141-
shutil.rmtree(dest_dir)
140+
if os.path.exists(TEMPLATES_DST_DIR):
141+
shutil.rmtree(TEMPLATES_DST_DIR)

0 commit comments

Comments
 (0)