Skip to content

Commit ef280c3

Browse files
authored
stop "conf"s all being the same dict (#212)
1 parent 0de3011 commit ef280c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

microscope/device_server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def device(
8181
cls: typing.Callable,
8282
host: str,
8383
port: int,
84-
conf: typing.Mapping[str, typing.Any] = {},
84+
conf: typing.Mapping[str, typing.Any] = None,
8585
uid: typing.Optional[str] = None,
8686
):
8787
"""Define devices and where to serve them.
@@ -119,6 +119,8 @@ def construct_devices() -> typing.Dict[str, Device]:
119119
]
120120
121121
"""
122+
if conf is None:
123+
conf = {}
122124
if not callable(cls):
123125
raise TypeError("cls must be a callable")
124126
elif isinstance(cls, type):

0 commit comments

Comments
 (0)