Wrong return type on create_timer()
还没有人认领这个 Issue。
评估
调研方向
从 azure/durable_functions/models/DurableOrchestrationContext.py 约第 601 行开始,检查 create_timer() 的返回注解。使用 Pylance 重现该示例,然后验证调用 cancel() 不再产生类型检查错误,并确认该注解准确表示返回的计时器任务。
由索引模型根据 Issue 内容生成。
描述
🐛 Describe the bug
Type hint for return value of create_timer() is TaskBase, but that does not contain the cancel() function. Returning TimerTask seems more appropiate.
Edit: See comment below on why TimerTask might not be a viable type anyway
Current source:
Example code:
expiration = context.current_utc_datetime + timedelta(seconds=20)
timeout_task = context.create_timer(expiration)
timeout_task.cancel() # <-- Pylance shows error: "Cannot access attribute "cancel" for class "TaskBase""
🤔 Expected behavior
You should be able to call cancel()without linter/type checker errors.
☕ Steps to reproduce
See above
- 主要语言
- Python
- 星标
- 157
- 派生
- 70
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/azure-functions-durable-python 的其他 Issue
-
Enhancement fixed-in-v2 P3
难度 2/5 1-3 小时 新手友好度 72/100
Azure/azure-functions-durable-python#617 · 1 条评论 ·
-
Custom object serialization broken for orchestrator return values可能已有人在做 @andystaples 于 66 天前认领。 未关闭bug fixed-in-v2 P2
难度 2/5 1-3 小时 新手友好度 75/100
Azure/azure-functions-durable-python#568 · 1 条评论 ·
-
bug fixed-in-v2 P3
难度 2/5 1-3 小时 新手友好度 72/100
Azure/azure-functions-durable-python#475 · 1 条评论 ·
-
Enhancement fixed-in-v2 P3
难度 4/5 3-5 天 新手友好度 62/100
Azure/azure-functions-durable-python#618 · 1 条评论 ·
-
blocked bug fixed-in-v2 known-regression
难度 4/5 3-5 天 新手友好度 45/100
Azure/azure-functions-durable-python#600 · 3 条评论 ·
查看 Azure/azure-functions-durable-python 的全部 Issue
相似的 Issue
-
needs-human needs-triage
难度 2/5 1-3 小时 新手友好度 76/100
gke-labs/kube-agents#2400 · 1 条评论 ·
维护者通常 1 天内回复
-
Device Details tables: FS/SF columns contradict each other (nfet_01v8 Vt row, pfet_01v8 Idsat row)未关闭
难度 2/5 1-3 小时 新手友好度 75/100
google/skywater-pdk#450 ·
-
Drained trajectory arrays are overwritten when the sequence buffer is reused可能已有人在做 @sylvesterkaczmarek 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
google-deepmind/bsuite#56 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
LearningCircuit/local-deep-research#7206 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
chingu-voyages/V62-tier3-team-33#285 ·
维护者通常 1 天内回复