From 6e15219fad1e8f039af9d61799c25042a5f979b7 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 5 May 2025 18:34:47 +0500 Subject: [PATCH] black . --- .../ifcopenshell/template.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/template.py b/src/ifcopenshell-python/ifcopenshell/template.py index d1192fc85c..d31b125279 100644 --- a/src/ifcopenshell-python/ifcopenshell/template.py +++ b/src/ifcopenshell-python/ifcopenshell/template.py @@ -60,20 +60,24 @@ END-ISO-10303-21; """ DEFAULTS = { - "application": lambda d: "IfcOpenShell contributors - IfcOpenShell - v%s" % get_pep440_version(version()), + "application": lambda d: "IfcOpenShell contributors - IfcOpenShell - v%s" % get_pep440_version(version()), "application_version": lambda d: get_pep440_version(version()), "project_globalid": lambda d: compress(uuid.uuid4().hex), "schema_identifier": lambda d: "IFC4", "timestamp": lambda d: int(time.time()), "timestring": lambda d: time.strftime("%Y-%m-%dT%H:%M:%S", time.gmtime(d.get("timestamp") or time.time())), "mvd": lambda d: ( - "ReferenceView_V1.2" if d.get("schema_identifier") == "IFC4" - else "CoordinationView_V2.0" if d.get("schema_identifier") == "IFC2X3" - else "ReferenceView" if d.get("schema_identifier") == "IFC4X3_ADD2" - else "ReferenceView_V1.2" + "ReferenceView_V1.2" + if d.get("schema_identifier") == "IFC4" + else ( + "CoordinationView_V2.0" + if d.get("schema_identifier") == "IFC2X3" + else "ReferenceView" if d.get("schema_identifier") == "IFC4X3_ADD2" else "ReferenceView_V1.2" + ) ), } + def get_pep440_version(ifcopenshell_wrapper_version): """ Returns a PEP 440-compliant version string, valid for use with @@ -81,6 +85,7 @@ def get_pep440_version(ifcopenshell_wrapper_version): """ return ifcopenshell_wrapper_version.replace("-", "+", 1) + def create( filename: Optional[str] = None, timestring: Optional[str] = None, @@ -92,7 +97,7 @@ def create( application: Optional[str] = None, project_globalid: Optional[str] = None, project_name: Optional[str] = None, - mvd: Optional[str] = None + mvd: Optional[str] = None, ) -> file: d = dict(locals())