You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Sphinx 5.1.1中类型别名在类型提示中未保留问题求助

Sphinx类型提示显示异常排查

我使用以下简化后的Python代码:

AgentAssignment = List[int]

def assignment2str(assignment: AgentAssignment):    
    pass

生成HTML文档后,函数的类型提示显示为List[int],而非我定义的别名AgentAssignment。相关的#6518问题虽标注已解决,但在2022年使用Sphinx 5.1.1(Python 3.8.2环境)时,该问题仍复现,请问我遗漏了哪些必要配置或操作步骤?

内容的提问来源于stack exchange,提问作者AlwaysLearning

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.24 04:06:25