Skip to content

Decompose high-complexity functions plot() and validate_input() #13

Description

@tschm

Subcategory: Code complexity (5→8).

Problem. Two functions rank E on cyclomatic complexity, far above the C threshold (CC 11); the rest of the codebase is A.

Files / lines to change:

  • src/pycharting/api/interface.py:35plot, CC 32
  • src/pycharting/data/ingestion.py:27validate_input, CC 31

Extract cohesive helpers (per-argument normalization/validation blocks) to bring each block to C or better.

Done when: uvx radon cc src -s shows no block above C (CC ≤ 10).

Evidence: F 35:0 plot - E (32); F 27:0 validate_input - E (31).

Context: $PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions