Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clean unused arguments in the Client.servers.rebuild method #407

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions hcloud/servers/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,14 @@ def create_image(
def rebuild(
self,
image: Image | BoundImage,
*,
return_response: bool = False,
) -> RebuildResponse | BoundAction:
# pylint: disable=unused-argument
**kwargs: Any,
) -> RebuildResponse:
"""Rebuilds a server overwriting its disk with the content of an image, thereby destroying all data on the target server.

:param image: Image to use for the rebuilt server
:param return_response: Whether to return the full response or only the action.
"""
return self._client.rebuild(self, image, return_response=return_response)
return self._client.rebuild(self, image)

def change_type(
self,
Expand Down Expand Up @@ -1012,7 +1011,6 @@ def rebuild(

:param server: Server to rebuild
:param image: Image to use for the rebuilt server
:param return_response: Whether to return the full response or only the action.
"""
data: dict[str, Any] = {"image": image.id_or_name}
response = self._client.request(
Expand Down