diff options
| author | 2024-01-03 17:02:59 +0000 | |
|---|---|---|
| committer | 2024-01-03 17:02:59 +0000 | |
| commit | aca5e66e04df4783619152f798cc9f9d2e04bf10 (patch) | |
| tree | dbfb6c72c25d475e1d76d819cdffd512344b4b69 /arthur | |
| parent | Bump deps to latest (diff) | |
Format code to new ruff formatter standards
Diffstat (limited to 'arthur')
| -rw-r--r-- | arthur/exts/kubernetes/certificates.py | 14 | ||||
| -rw-r--r-- | arthur/exts/kubernetes/deployments.py | 12 | ||||
| -rw-r--r-- | arthur/exts/kubernetes/nodes.py | 14 | 
3 files changed, 17 insertions, 23 deletions
| diff --git a/arthur/exts/kubernetes/certificates.py b/arthur/exts/kubernetes/certificates.py index a1306c9..eb2db4c 100644 --- a/arthur/exts/kubernetes/certificates.py +++ b/arthur/exts/kubernetes/certificates.py @@ -28,14 +28,12 @@ class Certificates(commands.Cog):          table_data = []          for certificate in certs["items"]: -            table_data.append( -                [ -                    certificate["metadata"]["name"], -                    ", ".join(certificate["spec"]["dnsNames"]), -                    certificate["spec"]["issuerRef"]["name"], -                    certificate["status"]["conditions"][0]["message"], -                ] -            ) +            table_data.append([ +                certificate["metadata"]["name"], +                ", ".join(certificate["spec"]["dnsNames"]), +                certificate["spec"]["issuerRef"]["name"], +                certificate["status"]["conditions"][0]["message"], +            ])          table = tabulate(              table_data, headers=["Name", "DNS Names", "Issuer", "Status"], tablefmt="psql" diff --git a/arthur/exts/kubernetes/deployments.py b/arthur/exts/kubernetes/deployments.py index b631688..04e69f0 100644 --- a/arthur/exts/kubernetes/deployments.py +++ b/arthur/exts/kubernetes/deployments.py @@ -122,13 +122,11 @@ class Deployments(commands.Cog):              else:                  emote = "\N{LARGE YELLOW CIRCLE}" -            table_data.append( -                [ -                    emote, -                    deployment.metadata.name, -                    f"{deployment.status.available_replicas or 0}/{deployment.spec.replicas}", -                ] -            ) +            table_data.append([ +                emote, +                deployment.metadata.name, +                f"{deployment.status.available_replicas or 0}/{deployment.spec.replicas}", +            ])          table = tabulate(              table_data, diff --git a/arthur/exts/kubernetes/nodes.py b/arthur/exts/kubernetes/nodes.py index 583f095..c349bd8 100644 --- a/arthur/exts/kubernetes/nodes.py +++ b/arthur/exts/kubernetes/nodes.py @@ -50,14 +50,12 @@ class Nodes(commands.Cog):              node_creation = node.metadata.creation_timestamp -            table_data.append( -                [ -                    node.metadata.name, -                    ", ".join(statuses), -                    node.status.node_info.kubelet_version, -                    node_creation, -                ] -            ) +            table_data.append([ +                node.metadata.name, +                ", ".join(statuses), +                node.status.node_info.kubelet_version, +                node_creation, +            ])          table = tabulate(              table_data, headers=["Name", "Status", "Kubernetes Version", "Created"], tablefmt="psql" | 
