Rude Clean Code
Clean Code plugin for the Rude Python linter,
exposing 26 Clean Code rules across module structure, functions, classes,
complexity, error handling, naming/literals, same-file duplication, and
polymorphism indicators (CC001–CC601) through Rude's rude.plugins
entry point.
Installation
pip install rude-clean-code
Rude discovers the plugin automatically via rude.plugins once installed.
Configuration profiles
Add the Basic profile snippet (CC0–CC3) to your pyproject.toml, or
include "CC4", "CC5", "CC6" for the Strict profile with heuristic
indicators:
[tool.rude]
select = ["CC0", "CC1", "CC2", "CC3"]
[tool.rude.rules.CC101]
max_lines = 30
Run Rude from the command line:
rude check --select CC0,CC1,CC2,CC3 src/
All CC0xx–CC3xx rules (except CC002 at INFO), plus CC403 and
CC501, report WARNING severity; CC002 and subjective indicator rules
(CC401, CC402, CC601) report INFO.
Implemented rules
- Modules (
CC0xx):CC001(max_lines = 400),CC002(__init__.pycontains runtime logic),CC003(__init__.pymissing__all__),CC004(deep relative import,max_relative_depth = 2),CC005(private symbol exported in__all__) - Functions (
CC1xx):CC101(max_lines = 30),CC102(max_parameters = 5),CC103(max_returns = 5),CC104(max_locals = 10),CC107(unused private helper) - Classes (
CC2xx):CC201(max_lines = 200),CC202(max_methods = 15),CC207(max_bases = 3) - Complexity and error handling (
CC3xx):CC301(max_depth = 4),CC302(max_operands = 3),CC303(max_branches = 10),CC306(nested ternary),CC308(globalstatement),CC309(broad exception swallowed),CC310(missing exception chaining),CC311(max_lines = 15) - In-file heuristics (
CC4xx–CC6xx, Strict profile):CC401(unclear function name),CC402(unclear class/variable name),CC403(repeated magic literal,min_occurrences = 3),CC501(duplicate function body within the same file,min_lines = 5; cross-file duplication is planned asCC502),CC601(repeatedisinstance/attribute switch,min_isinstance = 3)
The package initializer rude_clean_code exposes only VERSION (read from
installed distribution metadata); plugin rules live in rude_clean_code.plugin.
See the repository README and rule reference for full detection contracts, configuration options, and the backlog roadmap.
Metadata
Release files for rude-clean-code 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rude_clean_code-0.2.0.tar.gz | 38.0 kB | With provenance | Details for rude_clean_code-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rude_clean_code-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for rude_clean_code-0.2.0-py3-none-any.whl |
Total release size: 68.8 kB
Release files / rude_clean_code-0.2.0.tar.gz
| Download URL | rude_clean_code-0.2.0.tar.gz |
|---|---|
| Size | 38.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
92e5423f98c1122249ab8244db1a8face8cc573b64ae9c8539d0a185bc168ede
|
|
BLAKE2b-256 checksum How to use checksums |
e3d6de048376345d0f14deaa6c98a92b6502b2dfcd5b38340fec8db8a8bfdb19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.17
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / rude_clean_code-0.2.0-py3-none-any.whl
| Download URL | rude_clean_code-0.2.0-py3-none-any.whl |
|---|---|
| Size | 30.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3fc71b69fb5be6d0f2146a2d67df32c688a5f4b7a44b5353616670f3b8002d7
|
|
BLAKE2b-256 checksum How to use checksums |
cb3ecab3807ef778ab36f0f7ca622c3bee495300be5e24847b6166587244721b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.17
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logSecurity for rude-clean-code 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for rude_clean_code-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.