1+ from typing import Any , Dict , Union
2+
3+ import requests
4+
15from gitlab import cli
26from gitlab import exceptions as exc
37from gitlab .base import RESTManager
@@ -16,7 +20,7 @@ class SidekiqManager(RESTManager):
1620
1721 @cli .register_custom_action ("SidekiqManager" )
1822 @exc .on_http_error (exc .GitlabGetError )
19- def queue_metrics (self , ** kwargs ) :
23+ def queue_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- def process_metrics (self , ** kwargs ):
40+ def process_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- def job_stats (self , ** kwargs ) :
59+ def job_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- def compound_metrics (self , ** kwargs ):
76+ def compound_metrics (
77+ self , ** kwargs : Any
78+ ) -> Union [Dict [str , Any ], requests .Response ]:
7179 """Return all available metrics and statistics.
7280
7381 Args:
0 commit comments