Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf5a65f0

Browse files
authored
Merge pull request#1343 from JohnVillalovos/jlvillal/mypy_testing_things
chore: add and fix some type-hints in gitlab/client.py
2 parents7441455 +8837207 commitf5a65f0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎gitlab/client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ def http_list(
623623
query_data:Optional[Dict[str,Any]]=None,
624624
as_list=None,
625625
**kwargs,
626-
):
626+
)->Union["GitlabList",List[Dict[str,Any]]]:
627627
"""Make a GET request to the Gitlab server for list-oriented queries.
628628
629629
Args:
@@ -772,7 +772,9 @@ def http_delete(self, path: str, **kwargs) -> requests.Response:
772772
returnself.http_request("delete",path,**kwargs)
773773

774774
@gitlab.exceptions.on_http_error(gitlab.exceptions.GitlabSearchError)
775-
defsearch(self,scope:str,search:str,**kwargs)->requests.Response:
775+
defsearch(
776+
self,scope:str,search:str,**kwargs
777+
)->Union["GitlabList",List[Dict[str,Any]]]:
776778
"""Search GitLab resources matching the provided string.'
777779
778780
Args:
@@ -896,10 +898,10 @@ def __len__(self) -> int:
896898
return0
897899
returnint(self._total)
898900

899-
def__next__(self):
901+
def__next__(self)->Dict[str,Any]:
900902
returnself.next()
901903

902-
defnext(self)->"Gitlab":
904+
defnext(self)->Dict[str,Any]:
903905
try:
904906
item=self._data[self._current]
905907
self._current+=1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp