diff --git a/microscope/device_server.py b/microscope/device_server.py index 9067365d..01bd2f22 100644 --- a/microscope/device_server.py +++ b/microscope/device_server.py @@ -81,7 +81,7 @@ def device( cls: typing.Callable, host: str, port: int, - conf: typing.Mapping[str, typing.Any] = {}, + conf: typing.Mapping[str, typing.Any] = None, uid: typing.Optional[str] = None, ): """Define devices and where to serve them. @@ -119,6 +119,8 @@ def construct_devices() -> typing.Dict[str, Device]: ] """ + if conf is None: + conf = {} if not callable(cls): raise TypeError("cls must be a callable") elif isinstance(cls, type):