Fixed type of context manager
This commit is contained in:
parent
fd32c22e30
commit
8c50f73b34
1 changed files with 2 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
import logging
|
import logging
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from typing import Tuple
|
from typing import Tuple, Generator
|
||||||
|
|
||||||
import labthings.fields as fields
|
import labthings.fields as fields
|
||||||
from flask import abort
|
from flask import abort
|
||||||
|
|
@ -88,7 +88,7 @@ class LSTExtension(BaseExtension):
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def find_picamera() -> Tuple[PiCamera, BaseCamera, Microscope]:
|
def find_picamera() -> Generator[Tuple[PiCamera, BaseCamera, Microscope], None, None]:
|
||||||
"""Locate the microscope and raise a sensible error if it's missing."""
|
"""Locate the microscope and raise a sensible error if it's missing."""
|
||||||
microscope = find_component("org.openflexure.microscope")
|
microscope = find_component("org.openflexure.microscope")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue