mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-02-11 20:29:11 +00:00
fix: backslashes in f-string error on file drop dupe widget (#289)
* fix: python complaining about backslashes inside f-string expressions refactor excessively long f-string into separate variables * fix: missing f on f-string * Format with Ruff
This commit is contained in:
@@ -168,8 +168,15 @@ class DropImport:
|
||||
if len(self.duplicate_files) > display_limit:
|
||||
dupes_to_show = dupes_to_show[0:display_limit]
|
||||
|
||||
dupes_str = "\n ".join(map(lambda path: str(path), dupes_to_show))
|
||||
dupes_more = (
|
||||
f"\nand {len(self.duplicate_files)-display_limit} more "
|
||||
if len(self.duplicate_files) > display_limit
|
||||
else "\n"
|
||||
)
|
||||
|
||||
msgBox.setText(
|
||||
f"The following files:\n {'\n '.join(map(lambda path: str(path),self.get_relative_paths(dupes_to_show)))} {(f'\nand {len(self.duplicate_files)-display_limit} more ') if len(self.duplicate_files)>display_limit else '\n'}have filenames that already exist in the library folder."
|
||||
f"The following files:\n {dupes_str}{dupes_more}have filenames that already exist in the library folder."
|
||||
)
|
||||
msgBox.addButton("Skip", QMessageBox.ButtonRole.YesRole)
|
||||
msgBox.addButton("Override", QMessageBox.ButtonRole.DestructiveRole)
|
||||
|
||||
Reference in New Issue
Block a user