summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects/environments.py
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2022-01-06 00:42:47 -0800
committerJohn L. Villalovos <john@sodarock.com>2022-01-06 00:42:47 -0800
commit7555b3a663acdea99fab06baa23e48d335e7baec (patch)
tree25fe3834e8ae389cbcbd100d0817f7737ee3ad81 /gitlab/v4/objects/environments.py
parenta349793307e3a975bb51f864b48e5e9825f70182 (diff)
downloadgitlab-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/v4/objects/environments.py')
-rw-r--r--gitlab/v4/objects/environments.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/gitlab/v4/objects/environments.py b/gitlab/v4/objects/environments.py
index 35f2fb2..661ea55 100644
--- a/gitlab/v4/objects/environments.py
+++ b/gitlab/v4/objects/environments.py
@@ -1,7 +1,5 @@
from typing import Any, cast, Dict, Union
-import requests
-
from gitlab import cli
from gitlab import exceptions as exc
from gitlab.base import RequiredOptional, RESTManager, RESTObject
@@ -23,7 +21,7 @@ __all__ = [
class ProjectEnvironment(SaveMixin, ObjectDeleteMixin, RESTObject):
@cli.register_custom_action("ProjectEnvironment")
@exc.on_http_error(exc.GitlabStopError)
- def stop(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
+ def stop(self, **kwargs: Any) -> Dict[str, Any]:
"""Stop the environment.
Args: