summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects/features.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/features.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/features.py')
-rw-r--r--gitlab/v4/objects/features.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/gitlab/v4/objects/features.py b/gitlab/v4/objects/features.py
index 2e92596..555d2df 100644
--- a/gitlab/v4/objects/features.py
+++ b/gitlab/v4/objects/features.py
@@ -2,7 +2,7 @@
GitLab API:
https://docs.gitlab.com/ee/api/features.html
"""
-from typing import Any, Optional, TYPE_CHECKING, Union
+from typing import Any, Optional, Union
from gitlab import exceptions as exc
from gitlab import utils
@@ -62,6 +62,4 @@ class FeatureManager(ListMixin, DeleteMixin, RESTManager):
}
data = utils.remove_none_from_dict(data)
server_data = self.gitlab.http_post(path, post_data=data, **kwargs)
- if TYPE_CHECKING:
- assert isinstance(server_data, dict)
return self._obj_cls(self, server_data)