Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Streaming Event type, type hint, should support union type

已关闭 适合新手
#607 12 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 4 天内回复

@mvanhorn 已经在做这个了。

开始于 2026年4月8日。

  • #672 来自 @leobin001 —— 已关闭,未合并
  • #732 来自 @mvanhorn —— 未关闭
  • #754 来自 @Ghraven —— 已关闭,未合并
  • #813 来自 @ThyTran1402 —— 未关闭
  • #845 来自 @mirakour —— 未关闭
  • #864 来自 @Mr-Neutr0n —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
66/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
python

调研方向

定位 streaming_action.pydantic 入口点及其 stream_type 注解,然后检查该注解是如何被验证的,或如何暴露给类型检查器。使用 issue 中的 union 示例确认现有行为;如果周围的测试提供了合适的位置,则添加或更新针对性覆盖。完成的标准是:接受 BaseModel 变体的 union 类型,且不会将类型提示报告为无效。

由索引模型根据 Issue 内容生成。

描述

area/streaming area/typing good first issue help wanted kind/bug priority/high

Current behavior

When it's a union type it complains:

union = MyModel1 | MyModel2

@streaming_action.pydantic(
    reads=[...],
    writes=[...],
    state_input_type=..., 
    state_output_type=...
    stream_type=union, # type hint says this is invalid
)

because it is typed with :

stream_type: Union[Type["BaseModel"], Type[dict]],

Library & System Information

Latest burr

Expected behavior

It should be fine.

Additional context

The fix I think is to expand that stream type to handle a union of BaseModel types.

主要语言
Python
星标
2.6k
派生
208
平均合并
6 天 7 小时
30 天内合并 PR
26

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/burr 的其他 Issue

查看 apache/burr 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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