Skip to content

Commit bcc79f0

Browse files
committed
Use Literals as Type hint for GetAttributesByType
1 parent cfcd157 commit bcc79f0

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/perisso/tapir_commands.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,24 @@ def DeletePropertyDefinitions(
14031403

14041404
# endregion
14051405
# region Attribute Commands
1406-
def GetAttributesByType(self, attributeType: str | AttrType) -> Dict[str, Any]:
1406+
def GetAttributesByType(
1407+
self,
1408+
attributeType: Literal[
1409+
"Layer",
1410+
"Line",
1411+
"Fill",
1412+
"Composite",
1413+
"Surface",
1414+
"LayerCombination",
1415+
"ZoneCategory",
1416+
"Profile",
1417+
"PenTable",
1418+
"MEPSystem",
1419+
"OperationProfile",
1420+
"BuildingMaterial",
1421+
]
1422+
| AttrType,
1423+
) -> Dict[str, Any]:
14071424
"""Returns the details of every attribute of the given type."""
14081425
name_ = inspect.currentframe().f_code.co_name
14091426
if isinstance(attributeType, AttrType):

0 commit comments

Comments
 (0)