An autohooks plugin for python code formatting via ruff
Project description
autohooks-plugin-ruff
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
Built Distribution
Hashes for autohooks_plugin_ruff-23.11.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f6c3bc92449fc57c71dd4ac0a410d7f5229f3aff96921fa80c70a28d7db9366 |
|
MD5 | 3a2199e4a3b0589618b75c17e696c124 |
|
BLAKE2b-256 | e73a24b4c0e19a0716891a3e18f818c15267f0752aea65b86d16c8e1367a8547 |
Hashes for autohooks_plugin_ruff-23.11.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26f7be03e232a505e65246b666ea48a323a900d05bdef68e337a5c93dfdb23b1 |
|
MD5 | a6534a344b0abb9f68069316a7f47f78 |
|
BLAKE2b-256 | 475abf8cc7a37507d172323364d66a902d058014ea908b065bc7edfdd9234c0b |