mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
ifcpatch - try both out of tree and subpackage imports #5939
This commit is contained in:
@@ -114,7 +114,8 @@ def execute(args: ArgumentsDict) -> Union[ifcopenshell.file, str]:
|
||||
|
||||
|
||||
def get_patch_input_argument_use(recipe: str) -> Literal["REQUIRED", "SUPPORTED", "IGNORED"]:
|
||||
recipe_module = sys.modules[recipe]
|
||||
# try out of tree and subpackage imports
|
||||
recipe_module = sys.modules.get(f"ifcpatch.recipes.{recipe}") or sys.modules.get(recipe)
|
||||
return getattr(recipe_module.Patcher, "input_argument", "IGNORED")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user