Skip to content

Commit

Permalink
fix: strip func in cli (#74)
Browse files Browse the repository at this point in the history
<!-- 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 -->
  • Loading branch information
njzjz authored Jul 15, 2024
1 parent 17e7d61 commit 94d00fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dargs/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def check_cli(
dict
normalized data
"""
module_name, attr_name = func.rsplit(".", 1)
module_name, attr_name = func.strip().rsplit(".", 1)
try:
mod = __import__(module_name, globals(), locals(), [attr_name])
except ImportError as e:
Expand Down

0 comments on commit 94d00fe

Please sign in to comment.