You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: simplify client class inheritance complexity (#272)
- Instead of extensively overriding a parent method, use a private helper method.
- Prevent having get_actions methods for clients that do not support it.
- Make sure we document all the clients methods by not forgetting to override a parent method.
- Do not implement inheritance with different method signature.
* refactor: rename ClientEntityBase _get_all to _iter_pages
* refactor: move GetEntityByNameMixin.get_by_name to ClientEntityBase._get_first_by
Remove GetEntityByNameMixin and use _get_first_by method.
* refactor: remove ClientEntityBase get_* methods
* fix: always pass args before kwargs in _iter_pages
* refactor: reuse _get_first_by for all get_by_* methods
Copy file name to clipboardExpand all lines: hcloud/actions/client.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -101,4 +101,4 @@ def get_all(
101
101
Specify how the results are sorted. Choices: `id` `command` `status` `progress` `started` `finished` . You can add one of ":asc", ":desc" to modify sort order. ( ":asc" is default)
Specify how the results are sorted. Choices: `id` `command` `status` `progress` `started` `finished` . You can add one of ":asc", ":desc" to modify sort order. ( ":asc" is default)
0 commit comments