use comprehention

This commit is contained in:
Jakub Trllo 2025-06-03 14:33:31 +02:00
parent 79922d99b2
commit dd637bb25d

View file

@ -563,14 +563,15 @@ def _create_workfile_info_entity(
if value is not None:
attrib[key] = value
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
}
workfile_info = {
"id": uuid.uuid4().hex,