reduce max-complexity
Open
- Dominant language
- HTML
- Stars
- 5
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
We want to reduce the max-complexity over time - currently set in .flake8 as:
max-complexity = 22
which is far higher than the default. This will require several functions to be refactored to reduce branching. See https://en.wikipedia.org/wiki/Cyclomatic_complexity for how this is calculated.
Contributor guide
Research direction
Start with the max-complexity setting in .flake8 and review the linked cyclomatic-complexity definition. Run the configured complexity check to identify the functions above the target, then refactor the reported branching without changing behavior. Done means the threshold can be reduced from 22 and the complexity check passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100