refactor: use explicit conversion in f-strings

This commit is contained in:
Mark Paronyan committed 2026-10-01 19:57:41 +03:00
1 parent 0f66fd6c2b
commit c5b5091f5e
32 files changed
+65 -65

No files matched your search

+3 -3
View File
@@ -1731,7 +1731,7 @@ class Project:
)
shutil.rmtree(self.path)
except OSError as e:
raise ControllerError(f"Cannot delete project directory {self.path}: {str(e)}")
raise ControllerError(f"Cannot delete project directory {self.path}: {e!s}")
self.emit_controller_notification("project.deleted", self.asdict())
def _get_disconnected_computes(self):
@@ -2081,7 +2081,7 @@ class Project:
else:
log.info("Fast duplication failed, fallback to normal duplication")
except Exception as e:
raise ControllerError(f"Cannot duplicate project: {str(e)}")
raise ControllerError(f"Cannot duplicate project: {e!s}")
try:
begin = time.time()
@@ -2119,7 +2119,7 @@ class Project:
log.info(f"Project '{project.name}' duplicated in {time.time() - begin:.4f} seconds")
except (ValueError, OSError, UnicodeEncodeError) as e:
raise ControllerError(f"Cannot duplicate project: {str(e)}")
raise ControllerError(f"Cannot duplicate project: {e!s}")
if previous_status == "closed":
await self.close()