Skip to content

Commit

Permalink
MNT: clean-up Client._gather_data
Browse files Browse the repository at this point in the history
  • Loading branch information
shilorigins committed Jul 19, 2024
1 parent d346965 commit b21df18
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions superscore/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,19 +293,14 @@ def _gather_data(
elif isinstance(entry, Nestable):
for child in entry.children:
self._gather_data(child, pv_list, data_list, writable_only=writable_only)
elif isinstance(entry, Readback) and writable_only:
pass
else:
if isinstance(entry, Parameter):
pv_list.append(entry.pv_name)
if entry.readback is not None:
self._gather_data(entry.readback, pv_list, data_list, writable_only=writable_only)
elif isinstance(entry, Setpoint):
pv_list.append(entry.pv_name)
data_list.append(entry.data)
if entry.readback is not None:
self._gather_data(entry.readback, pv_list, data_list, writable_only=writable_only)
elif isinstance(entry, Readback) and not writable_only:
pv_list.append(entry.pv_name)
pv_list.append(entry.pv_name)
if hasattr(entry, "data"):
data_list.append(entry.data)
if hasattr(entry, "readback") and entry.readback is not None:
self._gather_data(entry.readback, pv_list, data_list, writable_only=writable_only)

return pv_list, data_list

Expand Down

0 comments on commit b21df18

Please sign in to comment.