google / google/python-fire

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

Open
#453 2 comments 6 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
28.2k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.