C901: functions exceed cyclomatic complexity limit of 10
- Dominant language
- Python
- Stars
- 8
- Forks
- 4
- Avg merge
- 8h 2m
- Merged PRs (30d)
- 2
Description
Three functions have cyclomatic complexity 13, exceeding the current lint limit of 10 (configured in ruff.toml):
- \star()\ in \elsim/methods/star.py:162\ — STAR voting algorithm
- \simulate_batch()\ in \examples/distributions_by_dispersion.py:40\
- \simulate_batch()\ in \examples/distributions_by_n_cands.py:40\
Decide whether to refactor to reduce complexity or raise the limit.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with ruff.toml and the three named functions: elsim/methods/star.py:162 and the simulate_batch functions at line 40 in both example files. Run the relevant Ruff check to confirm C901, then determine whether each function can be refactored without changing behavior or whether the configured limit should change. Done means the complexity warning is resolved or the limit decision is documented and verified.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100