Skip to content

Commit 61b9aaa

Browse files
committed
refactor
1 parent 1423b89 commit 61b9aaa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

radicli/util.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,9 @@ def get_arg(
296296
skip_resolve: bool = False,
297297
) -> ArgparseArg:
298298
"""Generate an argument to add to argparse and interpret types if possible."""
299-
if isinstance(param_type, str) and param_type in BASE_TYPES_MAP:
300-
param_type = BASE_TYPES_MAP[param_type]
301-
# Ensure param_type is not a string before passing to ArgparseArg
302299
if isinstance(param_type, str):
303-
param_type = None
300+
# Windows may pass param_types as str
301+
param_type = BASE_TYPES_MAP.get(param_type, None)
304302
arg = ArgparseArg(
305303
id=param,
306304
arg=orig_arg,

0 commit comments

Comments
 (0)