google / google/python-fire

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

未关闭
#343 4 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
28.2k
派生
1.5k
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。