google / google/python-fire

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

Aperta
#453 2 commenti 6 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
28.2k
Fork
1.5k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.