Skip to main content

pordego-complexity

Summary

Pordego plugin that analyzes code using the Radon library.

If the code does not meet a specified threshold, it will print the complex blocks and cause the pordego tool to return an error code.

Configuration

source_paths

There is one required parameter “source_paths”. This parameter should be a list of paths to directories containing Python source code (other types of code are ignored). The paths are searched recursively, so only the top level folder need be specified. The paths can be absolute or relative to the directory where pordego is run.

ignore_paths

Optional. A list of file patterns to ignore, such as “test” which will ignore all files containing “test”

complexity_threshold

Optional (default “B”). The maximum allowable complexity. See https://radon.readthedocs.io/en/latest/api.html#radon.complexity.cc_rank for a description of the ranks.

ignore_block_list

Optional. For lsiting all that legacy code that hasn’t been refactored yet.

Each entry in the list should be a string formatted like so: <path to file> <class name.method name or function name> <Max complexity grade>

<Path to file> should start with one of the paths specified in source_paths, so if the source path is relative, this should be as well Functions are specified with just the function name, methods that are part of a class (including class/staticmethods) are joined to the class name with a ‘.’ <Max complexity grade> specifies the worst grade that is allowed for the block of code. If the calculated grade is at or above the threshold grade, it will pass.

The easiest way to generate the ignore_block_list is to run the complexity plugin without ignore_block_list. The plugin prints the list of complex blocks in the same format as the ignore_block_list.

Example: path/to/my/src/mymodule.py MyClass.some_method D path/to/my/src/mymodule.py some_free_function E

Metadata

Release files for pordego-complexity 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pordego-complexity 1.0.4
File Size Uploaded Provenance
pordego-complexity-1.0.4.tar.gz 5.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pordego-complexity 1.0.4
File Interpreter ABI Platform
pordego_complexity-1.0.4-py2-none-any.whl Python 2 none any Details

Total release size: 13.3 kB

Release files / pordego-complexity-1.0.4.tar.gz

Download URL pordego-complexity-1.0.4.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fa2dc943ed565c0cd969777c29903f98471ff7f9bdf121cdc38ccf351e2aca1d
BLAKE2b-256 checksum
How to use checksums
5b1042c9e351cf4069e1069c5fb4e9c186fa183f298c504979087dd0c28a5b06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pordego_complexity-1.0.4-py2-none-any.whl

Download URL pordego_complexity-1.0.4-py2-none-any.whl
Size 7.7 kB
Tags Python 2
SHA-256 checksum
How to use checksums
c5d75e92e3111de35524731c8691d7198e9f267f94dcc3db7c80eb4ca8df0d5b
BLAKE2b-256 checksum
How to use checksums
236657b9c470058e60fc2c298687108ab3d680e6eaa2ed2b2b8648f22da03fe5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pordego-complexity 1.0.4

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page