typing and small refactor

This commit is contained in:
Andrej730
2024-03-22 13:58:07 +05:00
parent 5aa6123806
commit 7132c4e9bf
11 changed files with 126 additions and 117 deletions
@@ -19,7 +19,11 @@
# Note: it is the intent for you to override these with your own functions
def get_application(ifc):
import ifcopenshell
from typing import Union
def get_application(ifc: ifcopenshell.file) -> Union[ifcopenshell.entity_instance, None]:
"""Returns the application representing the authoring software
It is expected for you to overload this function with your own
@@ -39,7 +43,7 @@ def get_application(ifc):
return (app or [None])[0]
def get_user(ifc):
def get_user(ifc: ifcopenshell.file) -> Union[ifcopenshell.entity_instance, None]:
"""Returns the active authoring user
It is expected for you to overload this function with your own