Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

Commit 41fba86

Browse files
committed
generated by scripts/update-pycodestyle.sh in main repo
1 parent a6a6273 commit 41fba86

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

config/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
from .config_exception import ConfigException
1616
from .incluster_config import load_incluster_config
1717
from .kube_config import (list_kube_config_contexts, load_kube_config,
18-
new_client_from_config, load_kube_config_from_dict)
18+
load_kube_config_from_dict, new_client_from_config)

config/kube_config.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@
3030
import oauthlib.oauth2
3131
import urllib3
3232
import yaml
33-
from requests_oauthlib import OAuth2Session
34-
from six import PY3
35-
3633
from kubernetes.client import ApiClient, Configuration
3734
from kubernetes.config.exec_provider import ExecProvider
35+
from requests_oauthlib import OAuth2Session
36+
from six import PY3
3837

3938
from .config_exception import ConfigException
4039
from .dateutil import UTC, format_rfc3339, parse_rfc3339
@@ -688,13 +687,15 @@ def save_config(self, path):
688687
yaml.safe_dump(self.config_files[path], f,
689688
default_flow_style=False)
690689

690+
691691
def _get_kube_config_loader_for_yaml_file(
692692
filename, persist_config=False, **kwargs):
693693
return _get_kube_config_loader(
694694
filename=filename,
695695
persist_config=persist_config,
696696
**kwargs)
697697

698+
698699
def _get_kube_config_loader(
699700
filename=None,
700701
config_dict=None,
@@ -719,6 +720,7 @@ def _get_kube_config_loader(
719720
config_base_path=None,
720721
**kwargs)
721722

723+
722724
def list_kube_config_contexts(config_file=None):
723725

724726
if config_file is None:
@@ -757,9 +759,10 @@ def load_kube_config(config_file=None, context=None,
757759
else:
758760
loader.load_and_set(client_configuration)
759761

762+
760763
def load_kube_config_from_dict(config_dict, context=None,
761-
client_configuration=None,
762-
persist_config=True):
764+
client_configuration=None,
765+
persist_config=True):
763766
"""Loads authentication and cluster information from config_dict file
764767
and stores them in kubernetes.client.configuration.
765768
@@ -788,6 +791,7 @@ def load_kube_config_from_dict(config_dict, context=None,
788791
else:
789792
loader.load_and_set(client_configuration)
790793

794+
791795
def new_client_from_config(
792796
config_file=None,
793797
context=None,

config/kube_config_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@
2323

2424
import mock
2525
import yaml
26-
from six import PY3, next
27-
2826
from kubernetes.client import Configuration
27+
from six import PY3, next
2928

3029
from .config_exception import ConfigException
3130
from .dateutil import parse_rfc3339
@@ -1380,6 +1379,7 @@ def test__get_kube_config_loader_dict_no_persist(self):
13801379
config_dict=self.TEST_KUBE_CONFIG)
13811380
self.assertIsNone(actual._config_persister)
13821381

1382+
13831383
class TestKubernetesClientConfiguration(BaseTestCase):
13841384
# Verifies properties of kubernetes.client.Configuration.
13851385
# These tests guard against changes to the upstream configuration class,

0 commit comments

Comments
 (0)