google / google/python-fire

Could be cool and likely easy to add optional typechecking from annotations with Typeguard

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

Description

Typeguard https://github.com/agronholm/typeguard makes it very easy to add annotation-based type checking that uses the full gamut of what `typing` offers, with just a decorator, for example.

Using the type checking decorator with Fire is very cool, but I feel like it would be even better if Fire used it internally to display a more user-friendly message to the user when they give an input that doesn't fit the type of the annotation.

Thanks.

@dbieber

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.