google / google/python-fire

help page shows unwanted information about groups

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

描述

I have a file called `neptune` that just has some standalone functions, no classes or groups.

I create my cli by doing
```
if __name__ == '__main__':
fire.Fire()
```

When I do `neptune --help`, I see

![Screen Shot 2019-10-11 at 1 32 24 PM](https://user-images.githubusercontent.com/26889933/66683139-95a6db80-ec2b-11e9-8a30-d928b3352538.png)

I don't understand why it says

f - "Character and line based layer over a BufferedIOBase object, buffer"

I don't want to see that information about the `f` group when I do `neptune --help`

A workaround I came up with was to do this instead
```
if __name__ == '__main__':
fire.Fire({
'cmd1': cmd1,
'cmd2': cmd2,
...
})
```
This doesn't seem intuitive.

I'd be happy to help fix this if someone wants to point me in the right direction!

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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