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
Strings args do not need to be parsed. #459
Comments
I guess not parsing string args will also fix the following problem, right? I have with the following code:
If I call |
I also encountered a similar issue when passing a string starting with "-" , but it can be passed by explicitly specifying the parameter name, for example: import fire
def test(a, b):
print(a, b)
print(type(a), type(b))
if __name__ == "__main__":
fire.Fire(test) python ./test.py -a=1 -b='--2 3' 1 --2 3
<class 'int'> <class 'str'> |
I would like to pick this one up can it be assigned to me? |
python .\test.py 1 '2 3'
1 2 3
python .\test2.py 1 '""2 3""'
1 2 3
python .\test.py 1 '--2 3'
ERROR: The function received no value for the required argument: b
python .\test.py 1 '\"2 3\"'
python .\test.py 1 '\"\"2 3\"\"'
1 ""2 3""
The correct behavior should be equivalent to
print(1, "2 3")
, so strings args do not need to be parsed.The text was updated successfully, but these errors were encountered: