google / google/python-fire

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

オープン
#453 コメント 2 件 リアクション 6 件 担当者 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 を短くまとめたダイジェスト。