Skip to content

Commit 94d00fe

Browse files
authored
fix: strip func in cli (#74)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved handling of input strings in the CLI by trimming spaces before parsing. This prevents errors due to unexpected whitespace. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 17e7d61 commit 94d00fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dargs/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def check_cli(
9090
dict
9191
normalized data
9292
"""
93-
module_name, attr_name = func.rsplit(".", 1)
93+
module_name, attr_name = func.strip().rsplit(".", 1)
9494
try:
9595
mod = __import__(module_name, globals(), locals(), [attr_name])
9696
except ImportError as e:

0 commit comments

Comments
 (0)