Swap Generator annotation for Iterator
This commit is contained in:
parent
88de3089ea
commit
79b0d48cf4
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, Generator
|
from typing import Tuple, Iterator
|
||||||
|
|
||||||
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() -> Generator[Tuple[PiCamera, BaseCamera, Microscope], None, None]:
|
def find_picamera() -> Iterator[Tuple[PiCamera, BaseCamera, Microscope]]:
|
||||||
"""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