OpenStack Hacking Guideline Enforcement

8.0.0 · active · verified Thu Apr 16

Hacking is an OpenStack project that provides a set of Flake8 plugins to enforce the OpenStack Hacking Guidelines for Python code. It helps developers maintain consistent code style and identify common pitfalls specific to the OpenStack development community. The current version is 8.0.0, and it follows a release cadence tied to OpenStack cycles, with updates typically occurring every few months or as new guideline enforcement is required.

Common errors

Warnings

Install

Quickstart

This quickstart demonstrates how to install `flake8` and `hacking`, create a sample Python file with a common OpenStack hacking violation (H301), and then run `flake8` to see the generated warning. `hacking` automatically integrates its checks with `flake8` upon installation.

mkdir my_project
cd my_project
echo "def my_func( value ):\n    # H301: no space after parameters\n    pass" > app.py
pip install flake8 hacking
flake8 app.py

view raw JSON →