mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
typing
This commit is contained in:
@@ -167,6 +167,9 @@ def edit_pset(
|
||||
|
||||
|
||||
class Usecase:
|
||||
file: ifcopenshell.file
|
||||
settings: dict[str, Any]
|
||||
|
||||
def execute(self) -> None:
|
||||
self.update_pset_name()
|
||||
self.load_pset_template()
|
||||
@@ -378,7 +381,7 @@ class Usecase:
|
||||
properties.append(self.file.create_entity("IfcPropertySingleValue", **args))
|
||||
return properties
|
||||
|
||||
def assign_new_properties(self, props: ifcopenshell.entity_instance) -> None:
|
||||
def assign_new_properties(self, props: list[ifcopenshell.entity_instance]) -> None:
|
||||
if hasattr(self.settings["pset"], "HasProperties"):
|
||||
self.settings["pset"].HasProperties = props
|
||||
|
||||
|
||||
@@ -36,7 +36,18 @@ RECURRENCE_TYPE = Literal[
|
||||
]
|
||||
|
||||
|
||||
def derive_date(task, attribute_name, date=None, is_earliest=False, is_latest=False):
|
||||
def derive_date(
|
||||
task: ifcopenshell.entity_instance,
|
||||
attribute_name: str,
|
||||
date=None,
|
||||
is_earliest: bool = False,
|
||||
is_latest: bool = False,
|
||||
):
|
||||
"""
|
||||
|
||||
:param task: IfcTask.
|
||||
|
||||
"""
|
||||
if task.TaskTime:
|
||||
current_date = (
|
||||
ifcopenshell.util.date.ifc2datetime(getattr(task.TaskTime, attribute_name))
|
||||
|
||||
Reference in New Issue
Block a user