google / google/python-fire

[FEATURE REQUEST] typed arguments

Đang mở
#300 3 bình luận 1 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Python
Star
28.2k
Fork
1.5k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

If I write a typed variable argument, I am expecting an argument of a specific type.
Example:

```python
import fire

def test(some_str: str):
print(some_str)

if __name__ == "__main__":
fire.Fire()
```

Real result:

```shell
python test.py test 7.30
7.3
```

Expected Result:

```shell
python test.py test 7.30
7.30
```

So this feature will not break [argument parsing](https://github.com/google/python-fire/blob/master/docs/guide.md#argument-parsing). The typed argument should be enough to detect the real type.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.