mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 19:27:10 +00:00
typing
This commit is contained in:
@@ -44,13 +44,15 @@ class PsetQto:
|
|||||||
"IFC4X3_ADD2": "Pset_IFC4X3.ifc"
|
"IFC4X3_ADD2": "Pset_IFC4X3.ifc"
|
||||||
}
|
}
|
||||||
# fmt: on
|
# fmt: on
|
||||||
|
templates: list[ifcopenshell.file]
|
||||||
|
|
||||||
def __init__(self, schema_identifier: str, templates=None) -> None:
|
def __init__(self, schema_identifier: str, templates: Optional[list[ifcopenshell.file]] = None) -> None:
|
||||||
self.schema = ifcopenshell.schema_by_name(schema_identifier)
|
self.schema = ifcopenshell.schema_by_name(schema_identifier)
|
||||||
if not templates:
|
if not templates:
|
||||||
folder_path = pathlib.Path(__file__).parent.absolute()
|
folder_path = pathlib.Path(__file__).parent.absolute()
|
||||||
path = str(folder_path.joinpath("schema", self.templates_path[schema_identifier]))
|
path = str(folder_path.joinpath("schema", self.templates_path[schema_identifier]))
|
||||||
templates = [ifcopenshell.open(path)]
|
ifc_file: ifcopenshell.file = ifcopenshell.open(path)
|
||||||
|
templates = [ifc_file]
|
||||||
# See bug 3583. We backport this change from IFC4X3 because it just makes sense.
|
# See bug 3583. We backport this change from IFC4X3 because it just makes sense.
|
||||||
# Users aren't forced to use it.
|
# Users aren't forced to use it.
|
||||||
if schema_identifier == "IFC4":
|
if schema_identifier == "IFC4":
|
||||||
|
|||||||
Reference in New Issue
Block a user