Flake8 插件强制执行一致的类型注释样式
项目描述
flake8 类型注释
该工具用于验证类型注释语法,因为它最初 由Guido van Rossum提出。
安装
pip install flake8-type-annotations
代码示例
# Consistency with this plugin:
def function(param=0, other: int = 0) -> int:
return param + other
# Possible errors without this plugin:
def function(param=0, other: int=0)->int:
return param + other
错误代码
| 错误代码 | 描述 |
|---|---|
| T800 | 参数注释和默认值之间缺少空格 |
| T801 | 返回类型注释中缺少空格 |
执照
麻省理工学院。
项目详情
下载文件
下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。
源分布
flake8-type-annotations-0.1.0.tar.gz
(4.0 kB
查看哈希)
内置分布
关
flake8_type_annotations -0.1.0-py3-none-any.whl 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | de64de5efef3277d7b6012e8618c37d35b21465fb16292e46e6eec5b87e47a8c |
|
| MD5 | 5bac51582898b90faa4bc45349923fdf |
|
| 布莱克2-256 | 04e40ccc501ccadb718d8f71e70ccc9912a3266619008384b8773de787fa7c31 |