Skip to content

Commit c52ea16

Browse files
committed
Mention an exception in load_settings
This is caught internally - but it seemed easier to add an explanation in the docstring than to exempt it and document that. This isn't a user-facing function anyway.
1 parent ca7d8bd commit c52ea16

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/labthings_fastapi/thing.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ def load_settings(self) -> None:
200200
Note that no notifications will be triggered when the settings are set,
201201
so if action is needed (e.g. updating hardware with the loaded settings)
202202
it should be taken in ``__enter__``.
203+
204+
:raises TypeError: if the JSON file does not contain a dictionary. This is
205+
handled internally and logged, so the exception doesn't propagate
206+
outside of the function.
203207
"""
204208
setting_storage_path = self._thing_server_interface.settings_file_path
205209
thing_name = type(self).__name__

0 commit comments

Comments
 (0)