Repository navigation
docs: repair docstrings in the pin-policy tests and script - #153
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three defects in prose. No logic changes, and
ruff checkat the pinned 0.12.0passes before and after.
A line of code sat inside a docstring, splitting a sentence in half.
tests/test_pin_policy.pyread "...which /import pytest/ would break the fourconsumers". 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 realimports are
jsonandsubprocess, so the line goes without a replacement.Three references pointed at a file no reader can open.
auditoria-tests-canales.mddoes not exist in this repository or any otherpublic 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.pydocumented agit apicall. The script callsgh api;git apidoes not exist. A typo like that makes a reader doubt whetherthey misread or the author mistyped.
Verified:
python3 -m py_compileclean on both files,git grepreturns nothingfor either
auditoria-tests-canalesorgit api, andruff checkpasses at0.12.0 — the version
python-ci.ymlpins. Worth noting that a local ruff 0.16.4reports 16 errors here, identically on
main, which is the pinned-toolchainargument in
standards/cidemonstrating itself.