Skip to content

Reject incomplete single-cell address matches - #1609

Open
FanWu-ai wants to merge 1 commit into
burnash:masterfrom
FanWu-ai:fix-complete-cell-labels-20261011
Open

FanWu-ai wants to merge 1 commit into
burnash:masterfrom
FanWu-ai:fix-complete-cell-labels-20261011

Conversation

@FanWu-ai

Copy link
Copy Markdown

a1_to_rowcol currently accepts only a prefix of its input. For example, B2!D4 becomes (2, 2), and worksheet.update_acell('B2!D4', value) can update B2 rather than rejecting an unsupported sheet-qualified label. Ranges, appended text, decimal-looking suffixes and trailing newlines are silently truncated too.

Require a full regex match for this single-cell conversion and raise the existing IncorrectCellLabel before any read/write dispatch. Valid labels and the separate range parser retain their behavior. Regressions cover seven malformed labels and the public Cell/acell/update_acell paths.

Validation:

  • Pristine full suite: 166 passed; final: 168 passed on every Python 3.8–3.14 interpreter, no skips.
  • Eight original regression failures; 27,000 valid conversions unchanged.
  • Required lint, type/security checks, current pyupgrade, strict Sphinx docs, wheel/sdist and strict metadata validation pass.
  • The pinned Black rules were run serially on all 18 files discovered by Black itself because this environment blocks its multiprocessing socket; no rules or discovery filters changed.
  • Current pyupgrade requires the included small identity-comprehension normalization in Worksheet.findall; no dependency/checker pins changed.

The advisory pip-audit step (continue-on-error in upstream CI) still reports pre-existing vulnerabilities in pinned dependencies; it is not claimed green. Tests use the existing offline recordings without new credentials or live API calls. Other operating systems and hosted CI have not run locally.

AI assistance: OpenAI Codex was used to investigate, implement and test this fix. No human review is claimed.

AI assistance: OpenAI Codex was used for investigation, implementation, regression tests, and automated validation.
@FanWu-ai
FanWu-ai marked this pull request as ready for review October 11, 2026 17:13

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant