Skip to content

Commit 835e7e1

Browse files
committed
Update ReleaseShelf type hints for string-based task tracking
The completed_tasks field now stores task description strings rather than Task objects, so the Protocol type hints need to match. This keeps mypy happy after the ReleaseDriver serialization change.
1 parent 689acc9 commit 835e7e1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

release.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ def get(self, key: Literal["finished"], default: bool | None = None) -> bool: ..
4747

4848
@overload
4949
def get(
50-
self, key: Literal["completed_tasks"], default: list[Task] | None = None
51-
) -> list[Task]: ...
50+
self, key: Literal["completed_tasks"], default: list[str] | None = None
51+
) -> list[str]: ...
5252

5353
@overload
5454
def get(self, key: Literal["gpg_key"], default: str | None = None) -> str: ...
@@ -82,7 +82,7 @@ def get(self, key: Literal["release"], default: Tag | None = None) -> Tag: ...
8282
def __getitem__(self, key: Literal["finished"]) -> bool: ...
8383

8484
@overload
85-
def __getitem__(self, key: Literal["completed_tasks"]) -> list[Task]: ...
85+
def __getitem__(self, key: Literal["completed_tasks"]) -> list[str]: ...
8686

8787
@overload
8888
def __getitem__(self, key: Literal["gpg_key"]) -> str: ...
@@ -113,7 +113,7 @@ def __setitem__(self, key: Literal["finished"], value: bool) -> None: ...
113113

114114
@overload
115115
def __setitem__(
116-
self, key: Literal["completed_tasks"], value: list[Task]
116+
self, key: Literal["completed_tasks"], value: list[str]
117117
) -> None: ...
118118

119119
@overload

0 commit comments

Comments
 (0)