Skip to content

Commit 4d7a68d

Browse files
committed
Refactor import_pictures.py to simplify code and remove unused variables
1 parent 288bd55 commit 4d7a68d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/import_pictures.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ async def import_pictures():
9797

9898
files = list_files_in_dir('./cache/pictures')
9999

100-
# for file in files:
100+
for file in files:
101101
# if file.endswith(".old"):
102102
# with open(f'./cache/pictures/{file}', 'r', encoding='utf-8') as fichier:
103103
# datasOld[file.split('.')[0]] = json.load(fichier).get('data')
104104
# else:
105-
with open(f'./cache/pictures/{file}', 'r', encoding='utf-8') as fichier:
106-
datasCurrent[file.split('.')[0]] = json.load(fichier).get('data')
105+
with open(f'./cache/pictures/{file}', 'r', encoding='utf-8') as fichier:
106+
datasCurrent[file.split('.')[0]] = json.load(fichier).get('data')
107107

108108
# for file in files:
109109
# if datasOld.get(file.split('.')[0]) is not None:

0 commit comments

Comments
 (0)