From 0a1ba22a3d2abbf7743ccdb11048509c8ae02096 Mon Sep 17 00:00:00 2001 From: Roland Thomas Date: Wed, 21 May 2025 23:35:57 -0400 Subject: [PATCH] Remove args/kwargs being passed to generated Action from FactoryAction --- falyx/action/action_factory.py | 4 +++- falyx/version.py | 2 +- pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/falyx/action/action_factory.py b/falyx/action/action_factory.py index 4a56847..d57af7f 100644 --- a/falyx/action/action_factory.py +++ b/falyx/action/action_factory.py @@ -63,6 +63,8 @@ class ActionFactoryAction(BaseAction): return self.factory, None async def _run(self, *args, **kwargs) -> Any: + args = (*self.args, *args) + kwargs = {**self.kwargs, **kwargs} updated_kwargs = self._maybe_inject_last_result(kwargs) context = ExecutionContext( name=f"{self.name} (factory)", @@ -92,7 +94,7 @@ class ActionFactoryAction(BaseAction): ) if self.options_manager: generated_action.set_options_manager(self.options_manager) - context.result = await generated_action(*args, **kwargs) + context.result = await generated_action() await self.hooks.trigger(HookType.ON_SUCCESS, context) return context.result except Exception as error: diff --git a/falyx/version.py b/falyx/version.py index b84359f..57cc51c 100644 --- a/falyx/version.py +++ b/falyx/version.py @@ -1 +1 @@ -__version__ = "0.1.31" +__version__ = "0.1.32" diff --git a/pyproject.toml b/pyproject.toml index 5647406..02b5a2c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "falyx" -version = "0.1.31" +version = "0.1.32" description = "Reliable and introspectable async CLI action framework." authors = ["Roland Thomas Jr "] license = "MIT"