From ae526cb747b39a06a9b363d4d881fa42f363e556 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Wed, 8 Jul 2026 15:14:16 +0300 Subject: [PATCH] fix(types): make Provider/BumpStrategy protocol members read-only properties 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) --- semvertag/providers/_base.py | 3 ++- semvertag/strategies/_base.py | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/semvertag/providers/_base.py b/semvertag/providers/_base.py index fc14f2c..8ad3866 100644 --- a/semvertag/providers/_base.py +++ b/semvertag/providers/_base.py @@ -4,7 +4,8 @@ class Provider(typing.Protocol): - name: str + @property + def name(self) -> str: ... def get_default_branch(self) -> str: ... def get_latest_commit_on_default_branch(self) -> Commit: ... diff --git a/semvertag/strategies/_base.py b/semvertag/strategies/_base.py index 0ddf211..f89728d 100644 --- a/semvertag/strategies/_base.py +++ b/semvertag/strategies/_base.py @@ -4,8 +4,11 @@ class BumpStrategy(typing.Protocol): - name: str - no_bump_status: str - no_bump_reason: str + @property + def name(self) -> str: ... + @property + def no_bump_status(self) -> str: ... + @property + def no_bump_reason(self) -> str: ... def decide(self, commit: Commit) -> Bump: ...