google / google/python-fire

Simple string argument is Converted to integer because input only contains numeric data

未关闭
#453 2 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
28.2k
派生
1.5k
PR 合并指标
30 天内没有已合并 PR

描述

A simple argument is automatically converted to integer because the input only has numeric data in a string. I wondered if it is a wanted feature. Thank you

Python3 version = Pyton3.8.10
Fire version = 0.5

file sample.py
```Python3
import fire
from fire import Fire

print(fire.__version__)

def sample(sequence:str):
print(sequence, type(sequence))

Fire(sample)
```
```bash
$ python3 ./sample.py "00"
0.5.0
0
```

Expected behavior: "00" string type

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。