Skip to content

Commit

Permalink
add ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
olliesilvester committed Sep 19, 2023
1 parent d32d55c commit 418b146
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 3 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@
"numpydoc",
]

mypy_module_names = [
"yaml",
]

napoleon_google_docstring = False
napoleon_numpy_docstring = True

Expand All @@ -85,6 +81,9 @@
("py:class", "typing_extensions.Literal"),
]

# Exclude the 'PyYAML' module from type checking
autodoc_mock_imports = ["yaml"]

# Both the class’ and the __init__ method’s docstring are concatenated and
# inserted into the main body of the autoclass directive
autoclass_content = "both"
Expand Down
4 changes: 3 additions & 1 deletion src/ophyd_async/core/_device/device_save_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_signal_RWs_from_device(
return signalRWs


def save_device(device: Device, savename: str, ignore: Union[None, List[str]] = None):
def save_device(device: Device, savename: str, ignore: List[str] = []):
"""
Plan to save the setup of a device by getting a list of its signals and their
readback values
Expand Down Expand Up @@ -109,6 +109,8 @@ def save_device(device: Device, savename: str, ignore: Union[None, List[str]] =
for phase in phase_dicts:
signal_name_values: Dict[str, Any] = {}
for signal_name in phase.keys():
if signal_name in ignore:
continue
signal_name_values[signal_name] = signal_values[signal_value_index]
signal_value_index += 1

Expand Down

0 comments on commit 418b146

Please sign in to comment.