| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d6870a9 commit d0b0811
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -556,8 +556,7 @@ def _build_url(self, path: str) -> str: | |||
| 556 | 556 | """ | |
| 557 | 557 | if path.startswith("http://") or path.startswith("https://"): | |
| 558 | 558 | return path | |
| 559 | - else: | ||
| 560 | - return f"{self._url}{path}" | ||
| 559 | + return f"{self._url}{path}" | ||
| 561 | 560 | ||
| 562 | 561 | def _check_redirects(self, result: requests.Response) -> None: | |
| 563 | 562 | # Check the requests history to detect 301/302 redirections. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -47,8 +47,7 @@ def __init__( | |||
| 47 | 47 | def __str__(self) -> str: | |
| 48 | 48 | if self.response_code is not None: | |
| 49 | 49 | return f"{self.response_code}: {self.error_message}" | |
| 50 | - else: | ||
| 51 | - return f"{self.error_message}" | ||
| 50 | + return f"{self.error_message}" | ||
| 52 | 51 | ||
| 53 | 52 | ||
| 54 | 53 | class GitlabAuthenticationError(GitlabError): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -231,8 +231,7 @@ def list(self, **kwargs: Any) -> Union[base.RESTObjectList, List[base.RESTObject | |||
| 231 | 231 | obj = self.gitlab.http_list(path, **data) | |
| 232 | 232 | if isinstance(obj, list): | |
| 233 | 233 | return [self._obj_cls(self, item, created_from_list=True) for item in obj] | |
| 234 | - else: | ||
| 235 | - return base.RESTObjectList(self, self._obj_cls, obj) | ||
| 234 | + return base.RESTObjectList(self, self._obj_cls, obj) | ||
| 236 | 235 | ||
| 237 | 236 | ||
| 238 | 237 | class RetrieveMixin(ListMixin, GetMixin): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -49,5 +49,4 @@ def list(self, **kwargs: Any) -> Union[List[LDAPGroup], RESTObjectList]: | |||
| 49 | 49 | obj = self.gitlab.http_list(path, **data) | |
| 50 | 50 | if isinstance(obj, list): | |
| 51 | 51 | return [self._obj_cls(self, item) for item in obj] | |
| 52 | - else: | ||
| 53 | - return RESTObjectList(self, self._obj_cls, obj) | ||
| 52 | + return RESTObjectList(self, self._obj_cls, obj) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -57,7 +57,6 @@ disable = [ | |||
| 57 | 57 | "missing-class-docstring", | |
| 58 | 58 | "missing-function-docstring", | |
| 59 | 59 | "missing-module-docstring", | |
| 60 | - "no-else-return", | ||
| 61 | 60 | "no-self-use", | |
| 62 | 61 | "protected-access", | |
| 63 | 62 | "redefined-builtin", | |
| Back | FazBrowse Home | New Git URL |
0 commit comments