From a4fc6454e938108be5b7f9cc57c1ec1d4d302d1d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 12:23:03 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- kubespawner/reflector.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/kubespawner/reflector.py b/kubespawner/reflector.py index 7571ea9a..c2794015 100644 --- a/kubespawner/reflector.py +++ b/kubespawner/reflector.py @@ -5,7 +5,7 @@ import time from functools import partial -from kubernetes_asyncio import watch, client +from kubernetes_asyncio import client, watch from traitlets import Any, Bool, Dict, Int, Unicode from traitlets.config import LoggingConfigurable from urllib3.exceptions import ReadTimeoutError @@ -231,12 +231,13 @@ async def _list_and_update(self, resource_version=None): initial_resources_raw = await list_method(**kwargs) if not initial_resources_raw.ok: - self.log.error(f'Error when calling Kubernetes API.' + self.log.error( + f'Error when calling Kubernetes API.' f' Status: {initial_resources_raw.status} {initial_resources_raw.reason}.' - f' Message: {(await initial_resources_raw.json())["message"]}') + f' Message: {(await initial_resources_raw.json())["message"]}' + ) raise client.ApiException( - status=initial_resources_raw.status, - reason=initial_resources_raw.reason + status=initial_resources_raw.status, reason=initial_resources_raw.reason ) # This is an atomic operation on the dictionary!