-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix validation error in ScExplorerCli class #3
base: main
Are you sure you want to change the base?
Conversation
I think this change is not necessary. |
@soltia48 Thank you for addressing the problem! Let's try introducing the following function:
Then run:
Any valid int literals become int type. On the other hands, decimals leading zeros are not permitted, so they become str type. |
Related issue: google/python-fire#453 |
I think that Python Fire has arguments parsing related issue (not GitHub Issue). However, when this PR is applied, the difference between “1234”, “0123”, and “12 34” confuses users. If there is a better solution, it would be better. |
Removing Python Fire is another option, although not one that I would actively want to take. |
This pull request fixes a validation error in the
ScExplorerCli
class. Previously, thekey
argument was only allowed to be a string, but now it can also be an integer. This permits digit PIN.Note: argument validation or runtime type enforcing (not to be confused with static type checking) should be done with smarter way in the future.