ci: read pyscn report keys in either spelling - #416
Draft
thodson-usgs wants to merge 1 commit into
Draft
Conversation
pyscn 1.30.0 renamed the analyze report keys from CamelCase to snake_case, so the project-root sanity check would raise KeyError on any pin bump past 1.29.x -- losing the one guard that tells a degraded run (few imports resolved, higher score) from an improved one. Read either spelling, and say so plainly if a future shape matches neither. Also record why the two pyscn invocations stand: passing --json and --html together exits 1 with 'only one output format flag can be specified' after running the analysis, so a combined run costs the work and writes nothing. Verified against pyscn 1.29.0 and 1.30.1.
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.
Summary
pyscn 1.30.0 renamed the
analyzereport keys from CamelCase to snake_case. Theproject-root sanity check in
code-health.ymlreads them by their 1.29.xspelling, so any pin bump past 1.29.x would raise
KeyErrorand take out the oneguard that distinguishes a degraded run (few imports resolved, artificially
higher score) from a genuinely improved one.
plainly and point at the fix (update the check against the pinned version)
rather than dying on a
KeyError.pyscn analyzeinvocations stand: passing--jsonand--htmltogether exits 1 with "only one output format flag can be specified"after running the analysis, so a combined run pays for the work and writes no
report. Still true in 1.30.1.
Verification
Checked the report shape against pyscn 1.29.0 (CamelCase) and 1.30.1
(snake_case); the check reads both. Workflow-only change — no package code, so
the test/type/structure gates are unaffected.