Skip to content

fix(types): make Provider/BumpStrategy protocol members read-only properties#52

Merged
lesnik512 merged 1 commit into
mainfrom
fix-provider-strategy-protocol-types
Jul 8, 2026
Merged

fix(types): make Provider/BumpStrategy protocol members read-only properties#52
lesnik512 merged 1 commit into
mainfrom
fix-provider-strategy-protocol-types

Conversation

@lesnik512

Copy link
Copy Markdown
Member

The `checks / lint` job started failing on `ty` `invalid-return-type` errors in `ioc.py` after CI auto-resolved `ty` 0.0.57 (released 2026-07-08). Root cause: `Provider.name` and `BumpStrategy.{name,no_bump_status,no_bump_reason}` are declared as mutable protocol instance attributes, but the concrete impls declare them as `typing.ClassVar[str]` — which the newer `ty` correctly rejects as not satisfying a mutable protocol member.

Fix: declare those protocol members as read-only `@property` (satisfied by a `ClassVar`). Structural-only, no runtime change.

Verified: `uvx ty@latest` (0.0.57) clean, `just lint-ci` clean, 473 tests pass at 100% coverage. Also unblocks the docs PR #51.

🤖 Generated with Claude Code

…perties

ty 0.0.57 correctly rejects a ClassVar implementation of a mutable protocol instance attribute, so GitHubProvider/GitLabProvider (name) and the BumpStrategy impls (name/no_bump_status/no_bump_reason) failed 'checks / lint'. Declaring the protocol members as read-only @Property (which a ClassVar satisfies) fixes it. Structural-only: no runtime change; 473 tests pass at 100%, ty 0.0.57 clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lesnik512 lesnik512 merged commit c10e5be into main Jul 8, 2026
7 checks passed
@lesnik512 lesnik512 deleted the fix-provider-strategy-protocol-types branch July 8, 2026 12:15
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