Skip to content

docs: repair docstrings in the pin-policy tests and script - #153

Merged
Jaro-c merged 1 commit into
mainfrom
docs/fix-pin-policy-comments
Aug 25, 2026
Merged

Jaro-c merged 1 commit into
mainfrom
docs/fix-pin-policy-comments

Conversation

@Jaro-c

@Jaro-c Jaro-c commented Aug 25, 2026

Copy link
Copy Markdown
Member

Three defects in prose. No logic changes, and ruff check at the pinned 0.12.0
passes before and after.

A line of code sat inside a docstring, splitting a sentence in half.
tests/test_pin_policy.py read "...which / import pytest / would break the four
consumers". Inside a docstring it imports nothing — it is dead text that looks
like code, and it broke the sentence around it. I checked whether the file
actually needs pytest imported: it references pytest. zero times and its real
imports are json and subprocess, so the line goes without a replacement.

Three references pointed at a file no reader can open.
auditoria-tests-canales.md does not exist in this repository or any other
public one. The nearest thing lives in Glyndor/ai-context, which is private,
and is a different document anyway. This repository is public, so those citations
promised a source no external reader could ever reach. The substance is already
in the docstring — the four gaps are enumerated directly below, with line
numbers — so the citation went and the content stayed.

scripts/pin-policy.py documented a git api call. The script calls
gh api; git api does not exist. A typo like that makes a reader doubt whether
they misread or the author mistyped.

Verified: python3 -m py_compile clean on both files, git grep returns nothing
for either auditoria-tests-canales or git api, and ruff check passes at
0.12.0 — the version python-ci.yml pins. Worth noting that a local ruff 0.16.4
reports 16 errors here, identically on main, which is the pinned-toolchain
argument in standards/ci demonstrating itself.

Three defects misled readers without touching any logic:

- An `import pytest` line was wedged into the module docstring of
  tests/test_pin_policy.py, mid-sentence. The file uses no pytest
  API (fixtures live in conftest.py), so the stray line had to go
  and nothing else had to be added.

- tests/test_pin_policy.py cited `auditoria-tests-canales.md` three
  times. That document does not exist in any public Glyndor repo, so
  the link promised a source no reader could open. The four gaps
  are already enumerated below each reference, so removing the link
  leaves the substance intact.

- scripts/pin-policy.py: `call_failure`'s docstring said `git api`,
  which does not exist; the script invokes the `gh` CLI instead.

Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
@Jaro-c
Jaro-c merged commit de012af into main Aug 25, 2026
9 checks passed
@Jaro-c
Jaro-c deleted the docs/fix-pin-policy-comments branch August 25, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant