Convert Stage to a Protocol
The Stage is now implemented as a runtime-checkable Protocol. Part of this led to the realisation that we can't create a DirectThingClient based on a Protocol, only on a concrete Thing. While it might be a good idea to address that in LabThings in due course, for now we work around it by creating both a Protocol and a stub class. The stub class implements the protocol, and can be used to declare a dependency.
This commit is contained in:
parent
2e2e877d75
commit
a0fbbc3e40
7 changed files with 77 additions and 25 deletions
|
|
@ -25,7 +25,7 @@ from labthings_fastapi.types.numpy import NDArray
|
|||
from labthings_fastapi.server import ThingServer
|
||||
|
||||
from . import BaseCamera, JPEGBlob
|
||||
from ..stage import Stage
|
||||
from ..stage import StageProtocol as Stage
|
||||
|
||||
|
||||
class SimulatedCamera(BaseCamera):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue