diff options
author | John L. Villalovos <john@sodarock.com> | 2022-06-03 16:40:43 -0700 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2022-06-04 09:18:22 -0700 |
commit | 80aadaf4262016a8181b5150ca7e17c8139c15fa (patch) | |
tree | 8ac2d21a6e07eaa659de80e77b06bdef9780fa5b /gitlab/client.py | |
parent | d0b0811211f69f08436dcf7617c46617fe5c0b8b (diff) | |
download | gitlab-80aadaf4262016a8181b5150ca7e17c8139c15fa.tar.gz |
chore: enable pylint check: "no-self-use"
Enable the pylint check "no-self-use" and fix the errors detected.
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, |