Skip to content

Commit 3109d00

Browse files
committed
Apply pre-commit changes
Signed-off-by: Shahaf Bahar <[email protected]>
1 parent 0ef82fb commit 3109d00

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

ocp_resources/resource.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from typing import Optional, Any, Dict, List
1414

1515
import kubernetes
16-
from kubernetes import config, client
16+
from kubernetes import client
1717
from kubernetes.dynamic import DynamicClient, ResourceInstance
1818
import yaml
1919
from benedict import benedict
@@ -79,7 +79,11 @@ def _get_api_version(dyn_client: DynamicClient, api_group: str, kind: str) -> st
7979

8080

8181
def get_client(
82-
config_file: str = "", config_dict: Dict[str, Any] | None = None, context: str = "", proxy: str = "", **kwargs: Any
82+
config_file: str = "",
83+
config_dict: Dict[str, Any] | None = None,
84+
context: str = "",
85+
proxy: Optional[str] = "",
86+
**kwargs: Any,
8387
) -> DynamicClient:
8488
"""
8589
Get a kubernetes client.
@@ -124,7 +128,9 @@ def get_client(
124128
LOGGER.info("Trying to get client via new_client_from_config")
125129

126130
return kubernetes.dynamic.DynamicClient(
127-
client=kubernetes.config.new_client_from_config(config_file=config_file, client_configuration=client_configuration, context=context or None, **kwargs)
131+
client=kubernetes.config.new_client_from_config(
132+
config_file=config_file, client_configuration=client_configuration, context=context or None, **kwargs
133+
)
128134
)
129135
except MaxRetryError:
130136
# Ref: https://github.com/kubernetes-client/python/blob/v26.1.0/kubernetes/base/config/incluster_config.py

0 commit comments

Comments
 (0)