跳转到主要内容

确保多行容器的格式一致性。

项目描述

PyPI PyPI - Python Version GitHub Updates Build status

一个Flake8插件,用于确保多行容器的格式一致性。

安装

使用pip安装

pip install flake8-multiline-containers

规则

代码

规则

JS101

多行容器在开头的字符之后没有断裂

JS102

多行容器没有在同一列上关闭

示例

# Right: Opens and closes on same line
foo = {'a': 'hello', 'b': 'world'}


# Right: Line break after parenthesis, closes on same column as opening
foo = {
    'a': 'hello',
    'b': 'world',
}

# Right: Line break after parenthesis, closes on same column as opening
foo = [
    'hello', 'world',
]


# Wrong: JS101
foo = {'a': 'hello',
       'b': 'world',
}


# Wrong: JS101, JS102
foo = {'a': 'hello',
       'b': 'world'}


# Wrong: JS101, JS102
foo = {'hello',
       'world'
      }

项目详情


下载文件

下载适合您平台的应用程序。如果您不确定要选择哪个,请了解更多关于安装包的信息。

源代码分发

flake8-multiline-containers-0.0.19.tar.gz (6.1 kB 查看哈希)

上传时间: 源代码

构建的分发

flake8_multiline_containers-0.0.19-py3-none-any.whl (6.6 kB 查看哈希值)

上传时间 Python 3

由以下机构支持