From e66d1d6d748abf7af1a904bc852608af33e4dc79 Mon Sep 17 00:00:00 2001 From: Rikard Nordgren Date: Thu, 24 Oct 2024 10:32:18 +0200 Subject: [PATCH] Handle convert_input calls for private argument names --- deploy/func_conversion.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/deploy/func_conversion.py b/deploy/func_conversion.py index dc68cef..c4bf59b 100644 --- a/deploy/func_conversion.py +++ b/deploy/func_conversion.py @@ -124,10 +124,14 @@ def _preprocess_input(func): if key == 'return': continue args, origin = get_args(value), get_origin(value) + if key.startswith('_'): + mangled_key = '.' + key[1:] + else: + mangled_key = key if value is Union or origin is Union: - r_conversion = _get_conversion_str(key, args, origin) + r_conversion = _get_conversion_str(mangled_key, args, origin) else: - r_conversion = _get_conversion_str(key, value, origin) + r_conversion = _get_conversion_str(mangled_key, value, origin) if r_conversion is None: continue