Skip to content

Commit

Permalink
Format code to new ruff formatter standards
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLovering committed Jan 3, 2024
1 parent a418704 commit aca5e66
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 23 deletions.
14 changes: 6 additions & 8 deletions arthur/exts/kubernetes/certificates.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@ async def certificates_list(self, ctx: commands.Context, namespace: str = "defau
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"
Expand Down
12 changes: 5 additions & 7 deletions arthur/exts/kubernetes/deployments.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,11 @@ async def deployments_list(self, ctx: commands.Context, namespace: str = "defaul
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,
Expand Down
14 changes: 6 additions & 8 deletions arthur/exts/kubernetes/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,12 @@ async def nodes_list(self, ctx: commands.Context) -> None:

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"
Expand Down

0 comments on commit aca5e66

Please sign in to comment.