Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion microscope/device_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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):
Expand Down