mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
some typing
This commit is contained in:
@@ -88,7 +88,8 @@ class Usecase:
|
||||
self.settings = {"library": library, "element": element}
|
||||
|
||||
def execute(self):
|
||||
self.added_elements = {}
|
||||
# mapping of old element ids to new elements
|
||||
self.added_elements:dict[int, ifcopenshell.entity_instance] = {}
|
||||
self.whitelisted_inverse_attributes = {}
|
||||
if self.settings["element"].is_a("IfcTypeProduct"):
|
||||
self.target_class = "IfcTypeProduct"
|
||||
|
||||
@@ -25,7 +25,7 @@ import ifcopenshell.api.owner.settings
|
||||
class IFC4:
|
||||
@pytest.fixture(autouse=True)
|
||||
def setup(self):
|
||||
self.file = ifcopenshell.api.run("project.create_file")
|
||||
self.file:ifcopenshell.file = ifcopenshell.api.run("project.create_file")
|
||||
ifcopenshell.api.owner.settings.get_user = lambda ifc: (ifc.by_type("IfcPersonAndOrganization") or [None])[0]
|
||||
ifcopenshell.api.owner.settings.get_application = lambda ifc: (ifc.by_type("IfcApplication") or [None])[0]
|
||||
ifcopenshell.api.pre_listeners = {}
|
||||
@@ -35,7 +35,7 @@ class IFC4:
|
||||
class IFC2X3:
|
||||
@pytest.fixture(autouse=True)
|
||||
def setup(self):
|
||||
self.file = ifcopenshell.api.run("project.create_file", version="IFC2X3")
|
||||
self.file:ifcopenshell.file = ifcopenshell.api.run("project.create_file", version="IFC2X3")
|
||||
ifcopenshell.api.owner.settings.get_user = lambda ifc: ifc.createIfcPersonAndOrganization()
|
||||
ifcopenshell.api.owner.settings.get_application = lambda ifc: ifc.createIfcApplication()
|
||||
ifcopenshell.api.pre_listeners = {}
|
||||
|
||||
Reference in New Issue
Block a user