Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
tymmej committed Aug 29, 2023
1 parent 6624e46 commit 75be47b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sync_photos.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def generate_file_name(photo, file_size, destination_path, unique_file_names):
album_name = destination_path.split("/")[-1]
file_size_id_album_name_short_path = os.path.join(
destination_path,
f'{"__".join([album_name, name, file_size, base64.urlsafe_b64encode(photo.id.encode()).decode()[2:10]])}.{extension}',
f'{"__".join([album_name, name, file_size,
base64.urlsafe_b64encode(photo.id.encode()).decode()[2:10]])}.{extension}',
)
photo_file_name = unicodedata.normalize("NFC", file_size_id_album_name_short_path)
if os.path.isfile(file_size_id_path_norm):
Expand Down
2 changes: 2 additions & 0 deletions tests/test_sync_photos.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ def versions(self):
file_size="medium",
destination_path=self.destination_path,
files=None,
unique_file_names=False,
)
)

Expand All @@ -488,6 +489,7 @@ def versions(self):
file_size="thumb",
destination_path=self.destination_path,
files=None,
unique_file_names=False,
)
)

Expand Down

0 comments on commit 75be47b

Please sign in to comment.