mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Apply suggestions from code review
Co-authored-by: Ondřej Samohel <33513211+antirotor@users.noreply.github.com>
This commit is contained in:
parent
0bf1e9a934
commit
e3114d85b8
2 changed files with 12 additions and 11 deletions
|
|
@ -74,7 +74,7 @@ class WorkfileInfo:
|
|||
|
||||
Attributes:
|
||||
filepath (str): Path to the workfile.
|
||||
rootless_path (str): Path to the workfile without root. And without
|
||||
rootless_path (str): Path to the workfile without the root. And without
|
||||
backslashes on Windows.
|
||||
file_size (Optional[float]): Size of the workfile in bytes.
|
||||
file_created (Optional[float]): Timestamp when the workfile was
|
||||
|
|
@ -256,7 +256,7 @@ class IWorkfileHost:
|
|||
|
||||
"""
|
||||
@abstractmethod
|
||||
def save_workfile(self, dst_path: Optional[str] = None):
|
||||
def save_workfile(self, dst_path: Optional[str] = None) -> None:
|
||||
"""Save the currently opened scene.
|
||||
|
||||
Args:
|
||||
|
|
@ -267,7 +267,7 @@ class IWorkfileHost:
|
|||
pass
|
||||
|
||||
@abstractmethod
|
||||
def open_workfile(self, filepath: str):
|
||||
def open_workfile(self, filepath: str) -> None:
|
||||
"""Open passed filepath in the host.
|
||||
|
||||
Args:
|
||||
|
|
|
|||
|
|
@ -247,14 +247,15 @@ def save_workfile_info(
|
|||
description,
|
||||
)
|
||||
|
||||
data = {}
|
||||
for key, value in (
|
||||
("host_name", host_name),
|
||||
("version", version),
|
||||
("comment", comment),
|
||||
):
|
||||
if value is not None:
|
||||
data[key] = value
|
||||
data = {
|
||||
key: value
|
||||
for key, value in (
|
||||
("host_name", host_name),
|
||||
("version", version),
|
||||
("comment", comment),
|
||||
)
|
||||
if value is not None
|
||||
}
|
||||
|
||||
old_data = workfile_entity["data"]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue