mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
typing
This commit is contained in:
@@ -22,10 +22,13 @@ import ifcopenshell.api
|
||||
from typing import Literal
|
||||
|
||||
|
||||
ACTOR_TYPE = Literal["IfcActor", "IfcOccupant"]
|
||||
|
||||
|
||||
def add_actor(
|
||||
file: ifcopenshell.file,
|
||||
actor: ifcopenshell.entity_instance,
|
||||
ifc_class: Literal["IfcActor", "IfcOccupant"] = "IfcActor",
|
||||
ifc_class: ACTOR_TYPE = "IfcActor",
|
||||
) -> ifcopenshell.entity_instance:
|
||||
"""Adds a new actor
|
||||
|
||||
|
||||
@@ -16,10 +16,14 @@
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
|
||||
import ifcopenshell
|
||||
from typing import Literal
|
||||
|
||||
|
||||
ADDRESS_TYPE = Literal["IfcPostalAddress", "IfcTelecomAddress"]
|
||||
|
||||
|
||||
def add_address(
|
||||
file: ifcopenshell.file, assigned_object: ifcopenshell.entity_instance, ifc_class: str = "IfcPostalAddress"
|
||||
file: ifcopenshell.file, assigned_object: ifcopenshell.entity_instance, ifc_class: ADDRESS_TYPE = "IfcPostalAddress"
|
||||
) -> ifcopenshell.entity_instance:
|
||||
"""Add a new telecom or postal address to an organisation or person
|
||||
|
||||
|
||||
Reference in New Issue
Block a user