Skip to content

Commit fecbddf

Browse files
committed
fix: Make the workspace-less abstract clients abstract
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y1RzepycXEYA3LStfjt8cY
1 parent 7d89157 commit fecbddf

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

seam/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ async def list(
120120
raise NotImplementedError()
121121

122122

123-
class AbstractSeamWithoutWorkspace:
123+
class AbstractSeamWithoutWorkspace(abc.ABC):
124124
wait_for_action_attempt: Optional[Union[bool, Dict[str, float]]]
125125

126126
@abc.abstractmethod
@@ -145,7 +145,7 @@ def from_personal_access_token(
145145
raise NotImplementedError
146146

147147

148-
class AbstractAsyncSeamWithoutWorkspace:
148+
class AbstractAsyncSeamWithoutWorkspace(abc.ABC):
149149
wait_for_action_attempt: Optional[Union[bool, Dict[str, float]]]
150150

151151
@abc.abstractmethod

test/abstract_models_test.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import pytest
2+
3+
from seam.models import (
4+
AbstractAsyncSeamWithoutWorkspace,
5+
AbstractSeamWithoutWorkspace,
6+
)
7+
8+
9+
def test_abstract_seam_without_workspace_cannot_be_instantiated():
10+
with pytest.raises(TypeError, match="abstract"):
11+
AbstractSeamWithoutWorkspace("seam_at_token") # type: ignore[abstract]
12+
13+
14+
def test_abstract_async_seam_without_workspace_cannot_be_instantiated():
15+
with pytest.raises(TypeError, match="abstract"):
16+
AbstractAsyncSeamWithoutWorkspace("seam_at_token") # type: ignore[abstract]

0 commit comments

Comments
 (0)