Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions seam/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ async def list(
raise NotImplementedError()


class AbstractSeamWithoutWorkspace:
class AbstractSeamWithoutWorkspace(abc.ABC):
wait_for_action_attempt: Optional[Union[bool, Dict[str, float]]]

@abc.abstractmethod
Expand All @@ -145,7 +145,7 @@ def from_personal_access_token(
raise NotImplementedError


class AbstractAsyncSeamWithoutWorkspace:
class AbstractAsyncSeamWithoutWorkspace(abc.ABC):
wait_for_action_attempt: Optional[Union[bool, Dict[str, float]]]

@abc.abstractmethod
Expand Down
18 changes: 18 additions & 0 deletions test/abstract_models_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import pytest

from seam.models import (
AbstractAsyncSeamWithoutWorkspace,
AbstractSeamWithoutWorkspace,
)


def test_abstract_seam_without_workspace_cannot_be_instantiated():
with pytest.raises(TypeError, match="abstract"):
# pylint: disable-next=abstract-class-instantiated
AbstractSeamWithoutWorkspace("seam_at_token") # type: ignore[abstract]


def test_abstract_async_seam_without_workspace_cannot_be_instantiated():
with pytest.raises(TypeError, match="abstract"):
# pylint: disable-next=abstract-class-instantiated
AbstractAsyncSeamWithoutWorkspace("seam_at_token") # type: ignore[abstract]
Loading