Skip to main content

An autohooks plugin for python code formatting via ruff

Project description

Greenbone Logo

autohooks-plugin-ruff

PyPI release

An autohooks plugin for python code formatting via ruff.

Installation

Install using pip

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

pip install autohooks-plugin-ruff

Note the pip refers to the Python 3 package manager. In a 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-ruff is installed as a development dependency.

poetry install

Usage

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

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

What the plugin actually does is ruff check . on git commit, so you should be able to use the exact same settings as in ruff's docs.

Notes

This project only runs ruff as a pre-commit hook, so, all features from ruff should be available too.

To activate this pre-commit hook remember to run this command before you start:

poetry run autohooks activate --mode poetry

Maintainer

This project is maintained by Greenbone AG.

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) 2023 Greenbone AG

Licensed under the GNU General Public License v3.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_ruff-23.6.1.tar.gz (36.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autohooks_plugin_ruff-23.6.1-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file autohooks_plugin_ruff-23.6.1.tar.gz.

File metadata

  • Download URL: autohooks_plugin_ruff-23.6.1.tar.gz
  • Upload date:
  • Size: 36.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.12 Linux/5.15.0-1039-azure

File hashes

Hashes for autohooks_plugin_ruff-23.6.1.tar.gz
Algorithm Hash digest
SHA256 460fd343d113a8e20eade1c64aca673c07b930c5ee4d77938574911923cfbbf9
MD5 2d593e5ac986394d2ec27dea1a0b1bb2
BLAKE2b-256 1d6e0880431ca32044562a202e279b15fc0b225d5f2d7468aa4f185f2f8403b7

See more details on using hashes here.

File details

Details for the file autohooks_plugin_ruff-23.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for autohooks_plugin_ruff-23.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8afad5fe0d70eadc805e0c2b7b35e50e3e2d21ec45549a1fba721792cff6e28c
MD5 895a16b68c1e499b2dcc3dfa49827acd
BLAKE2b-256 2866b7cba85eb79f3ce656ce095b57c2459c5bef064cf54c0ef6ee6ce7347dcb

See more details on using hashes here.

Supported by

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