Use Ruff for linting and fix a ton of issues

This commit is contained in:
Veronica Berglyd Olsen
2025-04-03 01:15:52 +02:00
parent d2796d27c3
commit 53a2d0e691
43 changed files with 257 additions and 235 deletions
+2 -2
View File
@@ -379,7 +379,7 @@ class ProjectBuilder:
"""Build or copy a project from a data dictionary."""
if isinstance(data, dict):
path = data.get("path", None) or None
if isinstance(path, (str, Path)):
if isinstance(path, str | Path):
self._path = Path(path).resolve()
if data.get("sample", False):
return self._extractSampleProject(self._path)
@@ -509,7 +509,7 @@ class ProjectBuilder:
# Also add the archive and trash folders
project.newRoot(nwItemClass.ARCHIVE)
project.tree.trash # Triggers the creation of Trash
_ = project.tree.trash # Triggers the creation of Trash
project.saveProject()
project.closeProject()