From abe174c25916fed140cfcc927894fd9ca9a3bb3b Mon Sep 17 00:00:00 2001 From: Robin Andersson Date: Wed, 8 May 2024 10:28:42 +0200 Subject: [PATCH] type hints --- python/hopsworks/core/secret_api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/hopsworks/core/secret_api.py b/python/hopsworks/core/secret_api.py index 60a1f9415..28f2087fc 100644 --- a/python/hopsworks/core/secret_api.py +++ b/python/hopsworks/core/secret_api.py @@ -44,7 +44,7 @@ def get_secrets(self): _client._send_request("GET", path_params) ) - def get_secret(self, name: str, owner: str = None): + def get_secret(self, name: str, owner: str = None) -> secret.Secret: """Get a secret. # Arguments @@ -73,7 +73,7 @@ def get_secret(self, name: str, owner: str = None): return secret.Secret.from_response_json(_client._send_request("GET", path_params, query_params=query_params))[0] - def get(self, name: str, owner: str = None): + def get(self, name: str, owner: str = None) -> str: """Get the secret's value. If the secret does not exist, it prompts the user to create the secret if the application is running interactively @@ -99,7 +99,7 @@ def get(self, name: str, owner: str = None): else: raise e - def create_secret(self, name: str, value: str, project: str = None): + def create_secret(self, name: str, value: str, project: str = None) -> secret.Secret: """Create a new secret. ```python