An autohooks plugin for python code formatting via ruff
Project description
autohooks-plugin-ruff
An autohooks plugin for python code linting and formatting via ruff.
Installation
Install using pip
[!NOTE] The
pip install
command does no longer work out-of-the-box in newer distributions like Ubuntu >= 23.04 because of PEP 668.
You can install the latest stable release of autohooks-plugin-ruff from the Python Package Index using pip:
python3 -m pip install --user autohooks-plugin-ruff
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 add --group dev autohooks-plugin-ruff
Usage
To activate the ruff autohooks plugin for linting please run
poetry run autohooks plugins add autohooks.plugins.ruff.check
or alternatively add the following setting to your pyproject.toml file.
[tool.autohooks]
pre-commit = ["autohooks.plugins.ruff.check"]
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.
To activate the ruff autohooks plugin for code formatting please run
poetry run autohooks plugins add autohooks.plugins.ruff.format
or alternatively add the following setting to your pyproject.toml file.
[tool.autohooks]
pre-commit = ["autohooks.plugins.ruff.format"]
What the plugin actually does is ruff format .
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 - 2025 Greenbone AG
Licensed under the GNU General Public License v3.0 or later.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file autohooks_plugin_ruff-25.3.1.tar.gz
.
File metadata
- Download URL: autohooks_plugin_ruff-25.3.1.tar.gz
- Upload date:
- Size: 33.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30a5dce803cef6a5813afa805a8e7354973abf34cbd8634c27bde225618ee22f |
|
MD5 | fd5758f3af3580f68c8b34dd7d17c924 |
|
BLAKE2b-256 | f3df9445786458b17fc5bf970b36f47054046c7e81255cbee56f44bb487d4dc2 |
Provenance
The following attestation bundles were made for autohooks_plugin_ruff-25.3.1.tar.gz
:
Publisher:
deploy-pypi.yml
on greenbone/autohooks-plugin-ruff
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
autohooks_plugin_ruff-25.3.1.tar.gz
- Subject digest:
30a5dce803cef6a5813afa805a8e7354973abf34cbd8634c27bde225618ee22f
- Sigstore transparency entry: 180724215
- Sigstore integration time:
- Permalink:
greenbone/autohooks-plugin-ruff@00c89ea03509ef1ec8bb89a2f064da5cd3a3352a
- Branch / Tag:
refs/tags/v25.3.1
- Owner: https://github.com/greenbone
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
deploy-pypi.yml@00c89ea03509ef1ec8bb89a2f064da5cd3a3352a
- Trigger Event:
release
- Statement type:
File details
Details for the file autohooks_plugin_ruff-25.3.1-py3-none-any.whl
.
File metadata
- Download URL: autohooks_plugin_ruff-25.3.1-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ae465e72e063d9aef63309fabbb2c7b22edbf7da38a14ceaeeedf064784ca07 |
|
MD5 | e4e8b08352aac99bf4171b95fa46537f |
|
BLAKE2b-256 | 17a223747da28701591ab0b038a9ac97a4245bdde634a635617b00e07ebeee2e |
Provenance
The following attestation bundles were made for autohooks_plugin_ruff-25.3.1-py3-none-any.whl
:
Publisher:
deploy-pypi.yml
on greenbone/autohooks-plugin-ruff
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
autohooks_plugin_ruff-25.3.1-py3-none-any.whl
- Subject digest:
7ae465e72e063d9aef63309fabbb2c7b22edbf7da38a14ceaeeedf064784ca07
- Sigstore transparency entry: 180724219
- Sigstore integration time:
- Permalink:
greenbone/autohooks-plugin-ruff@00c89ea03509ef1ec8bb89a2f064da5cd3a3352a
- Branch / Tag:
refs/tags/v25.3.1
- Owner: https://github.com/greenbone
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
deploy-pypi.yml@00c89ea03509ef1ec8bb89a2f064da5cd3a3352a
- Trigger Event:
release
- Statement type: