fix(ci): wrap long changelog lines for lintian; clear pre-existing ty errors#209
Merged
Conversation
The release build regenerates debian/changelog from commit subjects and runs lintian with --fail-on warning, so a subject over ~76 chars trips debian-changelog-line-too-long and fails the build (it did, for 0.7.0). Port the wrap_changes helper already used by the shared-workflows fallback: fold each subject at 76 columns with a hanging indent. Also fix the stale `grep -v "~pre"` (tags use the `_pre` suffix) so pre-release tags are excluded from the since-last-tag range. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two dict literals were inferred as dict[str, str] from their initial string-only entries, then assigned a non-str value later (a forward_auth dict in routing.py, a read_only bool in the CasaOS transformer), tripping ty's invalid-assignment check. Annotate both as dict[str, Any] at construction. In routing.py the auth dict is now built before routing_data so the forward_auth branch mutates an explicitly typed local. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
What
Fix the red main CI from #208's merge, and clear the two pre-existing
tyerrors while here.Why
The release build (shared-workflows
build-release.yml) regeneratesdebian/changelogfrom commit subjects and runslintian --fail-on error,warning. The local.github/scripts/generate-changelog.shprefixed each subject with*but never wrapped, so a subject over ~76 chars overflows lintian's 80-column limit and fails the build. #208 had two such subjects, so the0.7.0auto-release failed at the lintian step (before any tag was created — revision stays at 1).This didn't affect downstream consumers (they build c-p-t from the git source, not the
.deb), but it left main red with no release artifact.Changes
fix(ci)— port thewrap_changeshelper the shared-workflows fallback already uses:fold -s -w 76each subject with a hangingindent for continuation lines. Also fixes a stalegrep -v "~pre"→_pre(tags use the underscore suffix per DEP-14), so pre-release tags are correctly excluded from the since-last-tag range. CI/tooling only — no version bump (.github/is excluded from the version-bump gate; VERSION is already ahead of stable).fix(types)— annotate two dict literals asdict[str, Any]thattyinferred asdict[str, str]from their string-only initial entries and then had a non-str value assigned (forward_authdict inrouting.py,read_onlybool in the CasaOS transformer). Clears the long-standingtydiagnostics souvx ty check src/is fully green. Bundled at maintainer request.Verification
uvx ty check src/→ All checks passed (was 2 diagnostics).uv run pytest -m "not install"→ 586 passed / 1 skipped. Lint + format clean.generate-changelog.sh --upstream 0.7.0 --revision 2locally: long subjects wrap, no line exceeds 80 columns.After merge, the next main build regenerates the wrapped changelog and produces
container-packaging-tools 0.7.0-1.🤖 Generated with Claude Code