mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
typing
This commit is contained in:
@@ -281,11 +281,11 @@ class entity_instance:
|
||||
|
||||
return entity_instance.walk(is_instance, unwrap, v)
|
||||
|
||||
def attribute_type(self, attr: int) -> str:
|
||||
def attribute_type(self, attr: Union[int, str]) -> str:
|
||||
"""Return the data type of a positional attribute of the element
|
||||
|
||||
:param attr: The index of the attribute
|
||||
:type attr: int
|
||||
:param attr: The index or name of the attribute
|
||||
:type attr: Union[int, str]
|
||||
:rtype: string
|
||||
"""
|
||||
attr_idx = attr if isinstance(attr, numbers.Integral) else self.wrapped_data.get_argument_index(attr)
|
||||
|
||||
Reference in New Issue
Block a user