mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
Fix processing ifcpatch docs after fe8c396e1
bim.update_ifc_patch_arguments in Bonsai wasn't ready for list[xxx] generic and was throwing errors and not showing browse file button.
This commit is contained in:
@@ -157,6 +157,13 @@ def _extract_docs(cls, method_name, boilerplate_args):
|
||||
type_hint = type_hints.get(input_name, None)
|
||||
if type_hint is None: # The argument is not type-hinted. (Or hinted to None ??)
|
||||
continue
|
||||
|
||||
input_data = inputs[input_name]
|
||||
# E.g. list[str].
|
||||
if isinstance(type_hint, typing.GenericAlias):
|
||||
input_data["generic_type"] = type_hint.__name__
|
||||
type_hint = typing.get_args(type_hint)[0]
|
||||
|
||||
if isinstance(type_hint, typing._UnionGenericAlias):
|
||||
inputs[input_name]["type"] = [t.__name__ for t in typing.get_args(type_hint)]
|
||||
elif type_hint.__name__ == "Literal":
|
||||
|
||||
Reference in New Issue
Block a user