Skip to content

Commit

Permalink
add types
Browse files Browse the repository at this point in the history
  • Loading branch information
aidangannon committed Sep 14, 2023
1 parent c23a2c7 commit 3c53040
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions server/src/core.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import typing
from typing import Protocol

from server.src.domain.models import Group

T = typing.TypeVar("T")


class BlobDataRepo(Protocol[T]):
class RepoBase(Protocol[T]):

def create(self, data: T) -> None:
...
Expand All @@ -13,4 +15,11 @@ def get_all(self) -> list[T]:
...

def get_by_id(self, _id: str) -> T:
...
...

def delete_by_id(self, _id: str) -> None:
...


class GroupRepo(RepoBase[Group]):
...

0 comments on commit 3c53040

Please sign in to comment.