Skip to content

Rename the open parameter that shadows the builtin in the public API #69

Description

@tschm

Subcategory: Linting/style + Public API / semver discipline
Score: public API 8 → 10

open is used as a parameter name, shadowing the builtin. Two of the four sites are in the public plot() signature, so renaming is a breaking change — worth doing now while the package is still 0.2.x with an Alpha classifier, rather than after 1.0.

What to change

  • src/pycharting/api/interface.py:77 — plot(..., open=None, ...) (public API)
  • src/pycharting/api/interface.py:171 — local rebinding open = np.array(open)
  • src/pycharting/data/ingestion.py:29 — validate_input(..., open=None, ...)
  • src/pycharting/data/ingestion.py:240 — DataManager.__init__(..., open=None, ...)

Note the property DataManager.open (ingestion.py:271) is an attribute, not a shadowed argument, and is not flagged.

done when

ruff reports no A001/A002, and the rename is reflected in the README API reference (README.md:172).

Evidence

A002 Function argument `open` is shadowing a Python builtin
  --> src/pycharting/api/interface.py:77:5

Surfaced by the Rhiza quality gates during the template bump to jebel-quant/rhiza@v1.2.2, which enabled the stricter ruff rule families (ANN, A, BLE, ARG) and TYPECHECKER=both. Gate status at time of filing: make fmt FAIL, make typecheck FAIL, make docs-coverage FAIL, test-layout FAIL; make deptry, make security, make test PASS (154 tests, 100% coverage).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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