Python Complexity

Measure per-function cyclomatic and cognitive complexity in Python to find refactor targets, using ruff's C901 and complexipy with no project install — then count what neither metric sees between functions: hops per public call, pass-through layers, a selector parameter compared in many places, intermediate types. Use when asking which functions to refactor or clean up first, whether a function or call path is too complex, over-layered, or too indirect, where the worst code in a module or package is, when every function scores low but the code is still hard to follow, when triaging a legacy codebase, when comparing an implementation against the path it replaces, when verifying a refactor reduced complexity rather than relocating it, or when reading C901 / mccabe / complexipy / cognitive-complexity scores. Teaches reading the two metrics as a pair — the gap between them is the signal — the silent-failure modes that make a clean run a lie, and the path-level census a per-function threshold never flags.

dashed ee71c5f 10 files · 196.5 KB Updated

File contents

dashed/claude-marketplace/tree/main/plugins/python-complexity/skills/python-complexity commit ee71c5f847

Frequently asked questions

npx skillmds@latest add dashed/python-complexity