diff options
author | John L. Villalovos <john@sodarock.com> | 2021-11-21 14:28:31 -0800 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2021-11-21 22:37:56 -0800 |
commit | a91a303e2217498293cf709b5e05930d41c95992 (patch) | |
tree | d395e91ac60f3e62695d36e154d1b39bc4813c97 /gitlab/v4/objects/sidekiq.py | |
parent | 8da0b758c589f608a6ae4eeb74b3f306609ba36d (diff) | |
download | gitlab-a91a303e2217498293cf709b5e05930d41c95992.tar.gz |
chore: add type-hints to gitlab/v4/objects/sidekiq.py
Diffstat (limited to 'gitlab/v4/objects/sidekiq.py')
-rw-r--r-- | gitlab/v4/objects/sidekiq.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gitlab/v4/objects/sidekiq.py b/gitlab/v4/objects/sidekiq.py index dc1094a..9e00fe4 100644 --- a/gitlab/v4/objects/sidekiq.py +++ b/gitlab/v4/objects/sidekiq.py @@ -1,3 +1,7 @@ +from typing import Any, Dict, Union + +import requests + from gitlab import cli from gitlab import exceptions as exc from gitlab.base import RESTManager @@ -16,7 +20,7 @@ class SidekiqManager(RESTManager): @cli.register_custom_action("SidekiqManager") @exc.on_http_error(exc.GitlabGetError) - def queue_metrics(self, **kwargs): + def queue_metrics(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]: """Return the registered queues information. Args: @@ -33,7 +37,9 @@ class SidekiqManager(RESTManager): @cli.register_custom_action("SidekiqManager") @exc.on_http_error(exc.GitlabGetError) - def process_metrics(self, **kwargs): + def process_metrics( + self, **kwargs: Any + ) -> Union[Dict[str, Any], requests.Response]: """Return the registered sidekiq workers. Args: @@ -50,7 +56,7 @@ class SidekiqManager(RESTManager): @cli.register_custom_action("SidekiqManager") @exc.on_http_error(exc.GitlabGetError) - def job_stats(self, **kwargs): + def job_stats(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]: """Return statistics about the jobs performed. Args: @@ -67,7 +73,9 @@ class SidekiqManager(RESTManager): @cli.register_custom_action("SidekiqManager") @exc.on_http_error(exc.GitlabGetError) - def compound_metrics(self, **kwargs): + def compound_metrics( + self, **kwargs: Any + ) -> Union[Dict[str, Any], requests.Response]: """Return all available metrics and statistics. Args: |