[client] Unify time_ago_value default: int 1 everywhere (str "1" in get_device_ts_time_ago) #186
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
get_device_ts_time_agodefaultstime_ago_value: int | str = "1"(string,_aggregations.py:176) while all five sibling aggregation methods default to the int1(_aggregations.py:57, 121, 230, 294, 346). Its docstring also saystime_ago_value (str)despite theint | strtype.The wire format is unchanged either way (the param is stringified into the query), so aligning on the int default is cosmetic consistency — but it is what makes the 6 signatures look alike and stops readers from wondering which one is intentional.
Fix:
time_ago_value: int | str = 1+ docstring(int | str); keep accepting strings (no behavior change for callers passing"1").Done when: all six defaults read
= 1,pytest -qgreen.