Flake8包装器,使其美观且可配置

flakehell的Python项目详细描述


它是一个Flake8包装器,可以让它变酷。

  • 可共享和远程配置。
  • 传统友好型:只报告新错误的能力。
  • 只使用指定的插件,而不是所有已安装的插件。
  • 管理每个插件的代码。
  • 通过通配符启用和禁用插件和代码。
  • 使输出美观。
  • pyproject.toml支持。
  • 显示已安装插件的代码。
  • 显示插件的所有消息和代码。
  • 检查是否安装了所有必需的插件。
  • 在消息和代码段中突出显示语法。
  • PyLint集成。
output example

安装

python3 -m pip install --user flakehell

用法

首先,让我们创建pyproject.tomlconfig:

[tool.flakehell]
# optionally inherit from remote config (or local if you want)
base = "https://raw.githubusercontent.com/life4/flakehell/master/pyproject.toml"
# specify any flake8 options. For example, exclude "example.py":
exclude = ["example.py"]
# make output nice
format = "grouped"
# 80 chars aren't enough in 21 century
max_line_length = 90
# show line of source code in output
show_source = true

# list of plugins and rules for them
[tool.flakehell.plugins]
# include everything in pyflakes except F401
pyflakes = ["+*", "-F401"]
# enable only codes from S100 to S199
flake8-bandit = ["-*", "+S1??"]
# enable everything that starts from `flake8-`
"flake8-*" = ["+*"]
# explicitly disable plugin
flake8-docstrings = ["-*"]

显示尚未安装的插件:

flakehell missed

显示已安装的插件、已使用的插件、指定的规则、代码前缀:

flakehell plugins
plugins command output

显示特定插件的代码和消息:

flakehell codes pyflakes
codes command output

对代码运行flake8:

flakehell lint

此命令接受与flake8相同的所有参数。

阅读flakehell.readthedocs.io了解更多信息。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java:如何使用另一个类中的对象   如何在Java中迭代旁遮普语(阿拉伯语)?   类Java嵌套ArrayList返回对象   java正则表达式以匹配“:”之后包含的字符串   java为什么main()很好地显示“Lukaku”并包含_names()返回null?   java嵌套循环,无法理解如何编写此代码   java使用maven动物嗅探器插件检查自己的API   java上传的文件创建保存以备将来在GWT服务器端使用   java转换为Dalvik格式失败65536限制   Java后端的javascript最佳RIA工具   amazon web服务如何将tar文件从amazonS3 bucket提取到Java中的另一个s3   java如何在hibernate搜索中实现对int值的搜索?   使用Maven初始化引导层JavaFX时发生java错误   java Google登录API例外:10:   java Glassfish 3.1.2加载本机库(.dll)   java在join操作中使用TumblingWindow,但没有将任何元素传输到my JoinFunction   IBatis+Java:检索HashMap   多线程java与scala在单独线程上读取文件