如何在包级别禁用mypy错误代码?

2024-04-23 16:18:45 发布

您现在位置:Python中文网/ 问答频道 /正文

variable=[]

错误:

 error: Need type annotation for 'variable' (hint: "variable: List[<type>] = ...")

在配置文件中:mypy.ini

disallow_any_expr=False

有没有办法通过配置文件中的标志来覆盖此错误


Tags: fortype配置文件错误anyerrorannotationneed