--- id: hacking version: "8.1.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # hacking — OpenStack Hacking Guideline Enforcement License: permissive · Maintenance: active · Downloads: 197.4K/mo ## 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 above — 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 pip install hacking uv add hacking 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_current - Install friction: low - Maintenance: active - Downloads: 197.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags openstack style guide enforcement, flake8 plugins for code style, automated python code linting, openstack hacking checks, python style guide validation, openstack, style-enforcement, flake8-plugin [View on SkillFed](https://skillfed.io/packages/hacking) · [View on PyPI](https://pypi.org/project/hacking/)