Closed jump2cn closed 5 months ago
import fire def test(value: str = None): print('got value:', value) if __name__ == '__main__': fire.Fire({ 'test': test })
> python test.py test "2e9672320848" < got value: inf
One option is: python test.py test '"2e9672320848"'
python test.py test '"2e9672320848"'
Another option is to decorate your function with @fire.decorators.SetParseFn(str)
@fire.decorators.SetParseFn(str)