Skip to content

Commit c42a158

Browse files
committed
Adjusted type hint for '_get_session()'
1 parent 84770ff commit c42a158

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/murfey/server/ispyb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import datetime
44
import logging
5-
from typing import Callable, List, Literal, Optional
5+
from typing import Callable, Generator, List, Literal, Optional
66

77
import ispyb
88

@@ -535,7 +535,7 @@ def do_buffer_lookup(self, app_id: int, uuid: int) -> Optional[int]:
535535
return reference
536536

537537

538-
def _get_session() -> sqlalchemy.orm.Session:
538+
def _get_session() -> Generator[Optional[sqlalchemy.orm.Session], None, None]:
539539
db = Session()
540540
if db is None:
541541
yield None

0 commit comments

Comments
 (0)