channable / channable/opsqueue

Add typing stubs (`.pyi` files) for PyO3-generated Python definitions

未关闭
#101 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
96
派生
2
平均合并
1 小时 2 分钟
30 天内合并 PR
2

描述

Even with https://github.com/channable/opsqueue/issues/8 resolved, type checkers will treat types that are exclusively defined via C bindings as `Any`. Typing stubs would fix this, but PyO3 currently does not generate them (https://github.com/PyO3/pyo3/issues/5137). Manually maintaining them would be annoying because it'd have to be kept in sync with the Rust definitions of the types, but it could still be valuable as a temporary solution.

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先定位通过 PyO3 暴露的 Rust 定义,并检查当前生成的 Python 定义是如何表示的。审查 PyO3 issue 5137 和现有的类型检查设置,然后确定 stubs 必须覆盖哪些导出类型和签名。完成意味着 stubs 描述了相关 binding,不再将这些类型保留为 Any,并且已记录如何与 Rust 定义一同维护。

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

评估

技术栈
python, rust
领域
developer-experience
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
需要澄清
新手友好度
38/100

把新 issue 发到你的邮箱

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