Skip to content

Commit 8417524

Browse files
committed
🎯 feat: update detail on dryrun method on caller stage.
1 parent bd364b2 commit 8417524

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

src/ddeutil/workflow/stages.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2156,12 +2156,28 @@ def dryrun(
21562156
necessary_params.append(k)
21572157
elif v.kind == Parameter.VAR_KEYWORD:
21582158
has_keyword = True
2159-
func_typed = get_type_hints(call_func)
2159+
2160+
func_typed: dict[str, Any] = get_type_hints(call_func)
2161+
map_type: str = "||".join(
2162+
f"\t{p}: {func_typed[p]}"
2163+
for p in necessary_params
2164+
if p in func_typed
2165+
)
2166+
map_type_args: str = "||".join(f"\t{a}: {type(a)}" for a in args)
2167+
if not has_keyword:
2168+
if "result" not in sig.parameters:
2169+
args.pop("result")
2170+
2171+
if "extras" not in sig.parameters:
2172+
args.pop("extras")
2173+
21602174
trace.debug(
21612175
f"[STAGE]: Details"
2162-
f"||Necessary Params: {necessary_params}"
2163-
f"||Argument Params: {list(args.keys())}"
2176+
f"||Necessary Params:"
2177+
f"||{map_type}"
21642178
f"||Return Type: {func_typed['return']}"
2179+
f"||Argument Params:"
2180+
f"||{map_type_args}"
21652181
f"||"
21662182
)
21672183
if has_keyword:

0 commit comments

Comments
 (0)