diff options
Diffstat (limited to 'gitlab/client.py')
-rw-r--r-- | gitlab/client.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gitlab/client.py b/gitlab/client.py index aa612c9..0019c0e 100644 --- a/gitlab/client.py +++ b/gitlab/client.py @@ -515,7 +515,8 @@ class Gitlab: self.http_username, self.http_password ) - def enable_debug(self) -> None: + @staticmethod + def enable_debug() -> None: import logging from http.client import HTTPConnection # noqa @@ -534,7 +535,8 @@ class Gitlab: "verify": self.ssl_verify, } - def _get_base_url(self, url: Optional[str] = None) -> str: + @staticmethod + def _get_base_url(url: Optional[str] = None) -> str: """Return the base URL with the trailing slash stripped. If the URL is a Falsy value, return the default URL. Returns: @@ -558,7 +560,8 @@ class Gitlab: return path return f"{self._url}{path}" - def _check_redirects(self, result: requests.Response) -> None: + @staticmethod + def _check_redirects(result: requests.Response) -> None: # Check the requests history to detect 301/302 redirections. # If the initial verb is POST or PUT, the redirected request will use a # GET request, leading to unwanted behaviour. @@ -583,8 +586,8 @@ class Gitlab: ) ) + @staticmethod def _prepare_send_data( - self, files: Optional[Dict[str, Any]] = None, post_data: Optional[Union[Dict[str, Any], bytes]] = None, raw: bool = False, |