skillfed

hacking

OpenStack Hacking Guideline Enforcement

hacking v8.1.0 197.4K downloads/30d#9,760 on PyPI
Permissive license Apache-2.0 Active released

What it is and what it does

Hacking is a collection of flake8 plugins designed to automate enforcement of the OpenStack Style Guide. It extends flake8 with OpenStack-specific checks that catch style violations, dangerous patterns (like shadowing built-ins), and common programming errors. The tool runs as part of code review workflows to reduce manual style nitpicking and ensure consistency across projects with multiple authors.

The package pins its dependencies—flake8, pep8, mccabe, and pyflakes—to specific versions to prevent new releases of those tools from introducing stricter rules or new checks that would unexpectedly break existing code. This stability is important for projects that gate on hacking versions. Some checks are disabled by default and can be enabled via configuration. Hacking also supports local project-specific checks registered as plugins in tox.ini.

Use it for:

  • Enforce OpenStack style guidelines in OpenStack projects and related codebases during CI/CD gating.
  • Catch dangerous patterns like reserved-word shadowing and unsafe logging practices automatically before code review.
  • Add project-specific linting rules by registering local plugins alongside hacking's built-in checks.
  • Ensure code style consistency across teams by automating what would otherwise require manual reviewer effort.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Hacking is a set of flake8 plugins that enforce the OpenStack Style Guide through automated code checks, catching style violations and dangerous patterns without manual review.

Yes, if you are working on OpenStack projects or adopting the OpenStack Style Guide. The low install friction, active maintenance, and permissive license make it a straightforward addition to a flake8-based workflow. If your project does not follow OpenStack conventions, the checks may not be relevant; evaluate whether the built-in rules align with your style guide first.

Install

hacking on PyPI

pip

pip install hacking

uv

uv add hacking

poetry

poetry add hacking

Installing hacking

Before you install

Low install friction with a single runtime dependency on flake8. Actively maintained with a recent release; pins its dependencies to prevent breaking changes from new versions of flake8 or its plugins.

License in practice

Apache-2.0 licensed under a permissive license, allowing use in proprietary and open-source projects without significant restrictions.

Quickstart

pip install hacking

Then in your project's tox.ini or .flake8 config:
[flake8]
enable-extensions = H106,H203

Run: flake8 your_code.py

Requires Python 3.10 or later. Hacking pins specific versions of flake8 and related plugins, so it will install those exact versions alongside itself.

Verify before relying

  • Whether the pinned flake8 and plugin versions in a given hacking release are compatible with other linting tools in your workflow.
  • How many OpenStack-specific checks are included in version 8.1.0 and whether they apply to non-OpenStack projects.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — flake8
Maintenance actively maintained — 64 days since the last release
First released
Downloads 197,427/month — #9,760 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: hacking-8.1.0-py3-none-any.whl

Development Status :: 4 - BetaEnvironment :: ConsoleEnvironment :: OpenStackIntended Audience :: DevelopersIntended Audience :: Information TechnologyOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Typing :: Typed

Tags

openstack style guide enforcementflake8 plugins for code styleautomated python code lintingopenstack hacking checkspython style guide validation
openstackstyle-enforcementflake8-plugin

More Quality Assurance packages