关键词:plugin to enforce consistent type annotation styles
flake8-type-annotations的Python项目详细描述
flake8类型注释
此工具用于验证类型批注语法 原来是originally proposed 通过Guido van Rossum。
安装
pip install flake8-type-annotations
代码示例
# Consistency with this plugin:deffunction(param=0,other:int=0)->int:returnparam+other# Possible errors without this plugin:deffunction(param=0,other:int=0)->int:returnparam+other
错误代码
Error code | Description |
---|---|
T800 | Missing spaces between parameter annotation and default value |
T801 | Missing spaces in return type annotation |
许可证
麻省理工学院。