Skip to content

grahamtt/autohooks-plugin-ruff

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

An autohooks plugin for linting via ruff

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%