google / google/python-fire

async callable objects

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

描述

With the following script:

```
class Build:
async def __call__(self):
pass

import fire
fire.Fire(dict(build=Build()))
```

Doing `./test.py build` outputs:

```
NAME
test.py build

SYNOPSIS
test.py build GROUP | COMMAND | VALUE

GROUPS
GROUP is one of the following:

cr_code
code(argcount, posonlyargcount, kwonlyargcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab[, freevars[, ce$

cr_frame

COMMANDS
COMMAND is one of the following:

close
close() -> raise GeneratorExit inside coroutine.

send
send(arg) -> send 'arg' into coroutine, return next iterated value or raise StopIteration.

throw
throw(typ[,val[,tb]]) -> raise exception in coroutine, return next iterated value or raise StopIteration.

VALUES
VALUE is one of the following:

cr_await

cr_origin

cr_running
```

Instead of firing `Build().__call__` as expected.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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