diff options
author | John L. Villalovos <john@sodarock.com> | 2022-01-06 00:42:47 -0800 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2022-01-06 00:42:47 -0800 |
commit | 7555b3a663acdea99fab06baa23e48d335e7baec (patch) | |
tree | 25fe3834e8ae389cbcbd100d0817f7737ee3ad81 /gitlab/client.py | |
parent | a349793307e3a975bb51f864b48e5e9825f70182 (diff) | |
download | gitlab-jlvillal/put_post_raw.tar.gz |
chore: correct type-hints for http_put/http_postjlvillal/put_post_raw
http_put/http_post will either return a JSON object or nothing. We
never expect them to return a raw requests.response object.
Update type-hints and code to no longer have a requests.response
object as a possible return value.
Diffstat (limited to 'gitlab/client.py')
-rw-r--r-- | gitlab/client.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gitlab/client.py b/gitlab/client.py index b791c8f..c48f01a 100644 --- a/gitlab/client.py +++ b/gitlab/client.py @@ -831,7 +831,7 @@ class Gitlab(object): raw: bool = False, files: Optional[Dict[str, Any]] = None, **kwargs: Any, - ) -> Union[Dict[str, Any], requests.Response]: + ) -> Dict[str, Any]: """Make a POST request to the Gitlab server. Args: @@ -870,7 +870,7 @@ class Gitlab(object): raise gitlab.exceptions.GitlabParsingError( error_message="Failed to parse the server message" ) from e - return result + return {} def http_put( self, @@ -880,7 +880,7 @@ class Gitlab(object): raw: bool = False, files: Optional[Dict[str, Any]] = None, **kwargs: Any, - ) -> Union[Dict[str, Any], requests.Response]: + ) -> Dict[str, Any]: """Make a PUT request to the Gitlab server. Args: |