Skip to main content

No project description provided

Project description

It’s a Flake8 wrapper to make it cool.

  • Use only specified plugins, not everything installed.

  • Manage codes per plugin.

  • Enable and disable plugins and codes by wildcard.

  • Make output beautiful.

  • Show codes for installed plugins.

  • Show all messages and codes for a plugin.

  • Check that all required plugins are installed.

  • Syntax highlighting in messages and code snippets.

output example

Installation

python3 -m pip install --user flakehell

Usage

First of all, let’s create pyproject.toml config:

[tool.flakehell]
exclude = ["example.py"]
format = "grouped"
max_line_length = 90
show_source = true

[tool.flakehell.plugins]
pyflakes = ["+*", "-F401"]
flake8-quotes = ["+*"]
  • You can specify any flake8 settings in [tool.flakehell].

  • [tool.flakehell.plugins] contains list of plugins and rules for them.

Show plugins that aren’t installed yet:

flakehell missed

Show installed plugins, used plugins, specified rules, codes prefixes:

flakehell plugins
plugins command output

Show codes and messages for a specific plugin:

flakehell codes pyflakes
codes command output

Run flake8 against the code:

flakehell lint

This command accepts all the same arguments as Flake8.

Formatters

Formatters make errors output nice. Available formatters:

  • colored – for humans.

  • grouped – also colored, but all messages are explicitly grouped by file.

  • json – no colors, only one json-dict per line for every error.

Also, you can specify show_source = true in the config to show line of source code where error occurred with syntax highlighting.

Colored:

colored

Colored with source code:

colored

Grouped:

grouped

Grouped with source code:

grouped

JSON:

json

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flakehell-0.1.0.tar.gz (16.4 kB view hashes)

Uploaded Source

Built Distribution

flakehell-0.1.0-py3-none-any.whl (20.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page