diff options
| author | 2023-04-27 22:26:24 +0100 | |
|---|---|---|
| committer | 2023-04-27 22:26:24 +0100 | |
| commit | d6a95edbc1b4cdb0e9dad5902c5b270c962453e8 (patch) | |
| tree | 86ead71bb3b5d57f886b77a45455d43bfa2cd5ec /arthur/apis/kubernetes/jobs.py | |
| parent | Replace Flake8 and various linting plugins with ruff (diff) | |
Fix linting errors from new ruff rules
Diffstat (limited to 'arthur/apis/kubernetes/jobs.py')
| -rw-r--r-- | arthur/apis/kubernetes/jobs.py | 7 | 
1 files changed, 3 insertions, 4 deletions
| diff --git a/arthur/apis/kubernetes/jobs.py b/arthur/apis/kubernetes/jobs.py index a5edc53..606177c 100644 --- a/arthur/apis/kubernetes/jobs.py +++ b/arthur/apis/kubernetes/jobs.py @@ -1,19 +1,18 @@  """APIs for interacting with Kubernetes Jobs & Cronjobs.""" -from typing import Any, Optional +from typing import Any  from kubernetes_asyncio import client  from kubernetes_asyncio.client.api_client import ApiClient  from kubernetes_asyncio.client.models import V1CronJob, V1CronJobList, V1Job -async def list_cronjobs(namespace: Optional[str] = None) -> V1CronJobList: +async def list_cronjobs(namespace: str | None = None) -> V1CronJobList:      """Query the Kubernetes API for a list of cronjobss in the provided namespace."""      async with ApiClient() as api:          api = client.BatchV1Api(api)          if namespace:              return await api.list_namespaced_cron_job(namespace) -        else: -            return await api.list_cron_job_for_all_namespaces() +        return await api.list_cron_job_for_all_namespaces()  async def get_cronjob(namespace: str, cronjob_name: str) -> V1CronJob: | 
