Skip to main content

An autohooks plugin for python code linting via flake8.

Project description

Greenbone Logo

autohooks-plugin-flake8

PyPI release

An autohooks plugin for python code linting via flake8.

Installation

Install using pip

You can install the latest stable release of autohooks-plugin-flake8 from the Python Package Index using pip:

python3 -m pip install autohooks-plugin-flake8

Note the pip refers to the Python 3 package manager. In an environment where Python 2 is also available the correct command may be pip3.

Install using poetry

It is highly encouraged to use poetry for maintaining your project's dependencies. Normally autohooks-plugin-flake8 is installed as a development dependency.

poetry install

Usage

To activate the flake8 autohooks plugin please add the following setting to your pyproject.toml file.

[tool.autohooks]
pre-commit = ["autohooks.plugins.flake8"]

By default, autohooks plugin flake8 checks all files with a .py ending. If only files in a sub-directory or files with different endings should be formatted, just add the following setting:

[tool.autohooks]
pre-commit = ["autohooks.plugins.flake8"]

[tool.autohooks.plugins.flake8]
include = ['foo/*.py', '*.foo']

To configure flake8 you can specify command-line options in the default flake8 configuration file .flake8 in the root directory of the git repository. To learn more about flake8 configuration see the configuration file or the flake8 documentation. You can specify your own configuration file using

arguments = ["--config=/path/to/flake8config"]

inside the [tool.autohooks.plugins.flake8] section of your projects pyproject.toml.

See flake8 --help for more details.

Maintainer

This project is maintained by Greenbone Networks GmbH.

Contributing

Your contributions are highly appreciated. Please create a pull request on GitHub. Bigger changes need to be discussed with the development team via the issues section at GitHub first.

License

Copyright (C) 2019 - 2022 Greenbone Networks GmbH

Licensed under the GNU General Public License v3.0 or later.

SPDX-License-Identifier: GPL-3.0-or-later

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

autohooks-plugin-flake8-22.6.1.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

autohooks_plugin_flake8-22.6.1-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file autohooks-plugin-flake8-22.6.1.tar.gz.

File metadata

  • Download URL: autohooks-plugin-flake8-22.6.1.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for autohooks-plugin-flake8-22.6.1.tar.gz
Algorithm Hash digest
SHA256 69d6ee703748cd11f7c5697ebfba404c302b950fa707c028b95591482dcc44be
MD5 45b5efa66a5f297deeef22c48c5dd12e
BLAKE2b-256 aecb129fe4c100d5ce97ca6f4fdcb7746aa38ac74d9e5844514f1aa00eba8e3e

See more details on using hashes here.

Provenance

File details

Details for the file autohooks_plugin_flake8-22.6.1-py3-none-any.whl.

File metadata

  • Download URL: autohooks_plugin_flake8-22.6.1-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for autohooks_plugin_flake8-22.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 74d2fb6dd7d92c67e942bca1d652f412ebcf75bb773d5da5ba9c87d59bd4f15e
MD5 50e322cf42a9ca00a6fca14fa5a35071
BLAKE2b-256 8d659c4b850052e62d7521630dfc8c42d1c98b6f293cf64a057f92797b451878

See more details on using hashes here.

Provenance

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