Skip to content

Commit a93ced2

Browse files
committed
Fix MyPy errors
1 parent 7556426 commit a93ced2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

server/app/interfaces/repository.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,14 @@ def __call__(self, environ, start_response) -> Iterable[bytes]:
167167
response: Response = self.handle_request(Request(environ))
168168
return response(environ, start_response)
169169

170-
def _get_obj_ts(self, identifier: model.Identifier, type_: Type[model.Identifiable]) \
171-
-> model.Identifiable:
170+
def _get_obj_ts(self, identifier: model.Identifier, type_: Type[T]) \
171+
-> T:
172172
identifiable = self.object_store.get(identifier)
173173
if not isinstance(identifiable, type_):
174174
raise NotFound(f"No {type_.__name__} with {identifier} found!")
175175
return identifiable
176176

177-
def _get_all_obj_of_type(self, type_: Type[model.Identifiable]) -> Iterator[model.Identifiable]:
177+
def _get_all_obj_of_type(self, type_: Type[T]) -> Iterator[T]:
178178
for obj in self.object_store:
179179
if isinstance(obj, type_):
180180
yield obj

0 commit comments

Comments
 (0)