google / google/python-fire

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

Ouverte
#343 4 commentaires 3 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
28.2k
Forks
1.5k
Métriques de merge des PR
Aucune PR mergée en 30 j

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.