[client] Fix docstring type drift: site_id documented (str) but typed int | str #188

Closed
opened 2026-10-27 11:31:57 +00:00 by mat · 0 comments
Owner

Several docstrings document parameter types that no longer match the signatures — the signatures accept int | str, the docstrings still say (str):

  • site_id (str): _aggregations.py:64, 128, 301, 353; _connected_objects.py:87; _devices.py:14; _grid.py:14; _sites.py:83
  • device_id (str) in get_device_ts_time_ago (_aggregations.py:183)
  • time_ago_value (str) in get_device_ts_time_ago (_aggregations.py:200) — typed int | str

Same root cause as the docstring-dedup issue: six near-verbatim copies that drift independently.

Fix: sweep the package for docstring/signature mismatches and align them; consider folding into the dedup work to avoid editing the same blocks twice.

Done when: docstrings match signatures everywhere in comwatt_client/, pytest -q green.

Several docstrings document parameter types that no longer match the signatures — the signatures accept `int | str`, the docstrings still say `(str)`: - `site_id (str)`: `_aggregations.py:64, 128, 301, 353`; `_connected_objects.py:87`; `_devices.py:14`; `_grid.py:14`; `_sites.py:83` - `device_id (str)` in `get_device_ts_time_ago` (`_aggregations.py:183`) - `time_ago_value (str)` in `get_device_ts_time_ago` (`_aggregations.py:200`) — typed `int | str` Same root cause as the docstring-dedup issue: six near-verbatim copies that drift independently. **Fix:** sweep the package for docstring/signature mismatches and align them; consider folding into the dedup work to avoid editing the same blocks twice. **Done when:** docstrings match signatures everywhere in `comwatt_client/`, `pytest -q` green.
mat closed this issue 2026-10-27 14:39:08 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mat/python-comwatt-client#188
No description provided.