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

Commit1ecb0a6

Browse files
chore: add type-hints to gitlab/v4/objects/sidekiq.py
1 parentd75abd8 commit1ecb0a6

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

‎gitlab/v4/objects/sidekiq.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
fromtypingimportAny,Dict,Union
2+
3+
importrequests
4+
15
fromgitlabimportcli
26
fromgitlabimportexceptionsasexc
37
fromgitlab.baseimportRESTManager
@@ -16,7 +20,7 @@ class SidekiqManager(RESTManager):
1620

1721
@cli.register_custom_action("SidekiqManager")
1822
@exc.on_http_error(exc.GitlabGetError)
19-
defqueue_metrics(self,**kwargs):
23+
defqueue_metrics(self,**kwargs:Any)->Union[Dict[str,Any],requests.Response]:
2024
"""Return the registered queues information.
2125
2226
Args:
@@ -33,7 +37,9 @@ def queue_metrics(self, **kwargs):
3337

3438
@cli.register_custom_action("SidekiqManager")
3539
@exc.on_http_error(exc.GitlabGetError)
36-
defprocess_metrics(self,**kwargs):
40+
defprocess_metrics(
41+
self,**kwargs:Any
42+
)->Union[Dict[str,Any],requests.Response]:
3743
"""Return the registered sidekiq workers.
3844
3945
Args:
@@ -50,7 +56,7 @@ def process_metrics(self, **kwargs):
5056

5157
@cli.register_custom_action("SidekiqManager")
5258
@exc.on_http_error(exc.GitlabGetError)
53-
defjob_stats(self,**kwargs):
59+
defjob_stats(self,**kwargs:Any)->Union[Dict[str,Any],requests.Response]:
5460
"""Return statistics about the jobs performed.
5561
5662
Args:
@@ -67,7 +73,9 @@ def job_stats(self, **kwargs):
6773

6874
@cli.register_custom_action("SidekiqManager")
6975
@exc.on_http_error(exc.GitlabGetError)
70-
defcompound_metrics(self,**kwargs):
76+
defcompound_metrics(
77+
self,**kwargs:Any
78+
)->Union[Dict[str,Any],requests.Response]:
7179
"""Return all available metrics and statistics.
7280
7381
Args:

‎pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ files = "."
1212
module = [
1313
"docs.*",
1414
"docs.ext.*",
15-
"gitlab.v4.objects.sidekiq",
1615
"tests.functional.*",
1716
"tests.functional.api.*",
1817
"tests.meta.*",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp