From 3f51014a2d347d6cab66b19538ceb60250f138d0 Mon Sep 17 00:00:00 2001 From: Julian Vogel Date: Fri, 8 Nov 2024 16:51:58 +0100 Subject: [PATCH] style(gen): fix get_property_definitions code style --- src/pdf2aas/generator/aas_template.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pdf2aas/generator/aas_template.py b/src/pdf2aas/generator/aas_template.py index 2e130cc..7995d61 100644 --- a/src/pdf2aas/generator/aas_template.py +++ b/src/pdf2aas/generator/aas_template.py @@ -130,7 +130,9 @@ def get_property(self, id_: str) -> Property | None: property_, _ = self._properties.get(id_, (None, None)) return property_ - def get_property_definitions(self, overwrite_dataspec: bool = False) -> list[PropertyDefinition]: + def get_property_definitions( + self, *, overwrite_dataspec: bool = False, + ) -> list[PropertyDefinition]: """Derive the property definition from the properties found in the template.""" definitions = [] for property_, _ in self._properties.values(): @@ -141,7 +143,11 @@ def get_property_definitions(self, overwrite_dataspec: bool = False) -> list[Pro definition.name = {} else: definition.name = {property_.language: property_.label} - if definition.definition is None or len(definition.definition) == 0 or overwrite_dataspec: + if ( + definition.definition is None + or len(definition.definition) == 0 + or overwrite_dataspec + ): if property_.reference is None or len(property_.reference) == 0: definition.definition = {} else: