From 8bb787c562aba85fbffbd2c17c502a9085a20f3b Mon Sep 17 00:00:00 2001 From: Patrick Ogenstad Date: Wed, 30 Oct 2024 12:30:35 +0100 Subject: [PATCH] Initialize transform using `__init__()` --- backend/infrahub/git/integrator.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/infrahub/git/integrator.py b/backend/infrahub/git/integrator.py index 84ae18fa6c..234b8b8aed 100644 --- a/backend/infrahub/git/integrator.py +++ b/backend/infrahub/git/integrator.py @@ -1229,11 +1229,9 @@ async def execute_python_transform( module = importlib.import_module(file_info.module_name) - transform_class: InfrahubTransform = getattr(module, class_name) + transform_class: type[InfrahubTransform] = getattr(module, class_name) - transform = await transform_class.init( - root_directory=commit_worktree.directory, branch=branch_name, client=client - ) + transform = transform_class(root_directory=commit_worktree.directory, branch=branch_name, client=client) return await transform.run(data=data) except ModuleNotFoundError as exc: