async callable objects
- 主要語言
- 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.
貢獻指南
研究方向
Start by running the script from the issue and inspect the Python Fire entry points reached by fire.Fire(dict(build=Build())). Trace how the async callable object is interpreted versus its coroutine attributes. Done means invoking `build` fires `Build().__call__` rather than exposing coroutine internals.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- cli
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100