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

Commit 70d6639

Browse files
authored
Merge pull request #200 from roycaihw/fix/pycodestyle
Run scripts/update-pycodestyle.sh to fix the pycodestyle test failure
2 parents a6a6273 + 982de11 commit 70d6639

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
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

+7-2
Original file line numberDiff line numberDiff line change
@@ -688,13 +688,15 @@ def save_config(self, path):
688688
yaml.safe_dump(self.config_files[path], f,
689689
default_flow_style=False)
690690

691+
691692
def _get_kube_config_loader_for_yaml_file(
692693
filename, persist_config=False, **kwargs):
693694
return _get_kube_config_loader(
694695
filename=filename,
695696
persist_config=persist_config,
696697
**kwargs)
697698

699+
698700
def _get_kube_config_loader(
699701
filename=None,
700702
config_dict=None,
@@ -719,6 +721,7 @@ def _get_kube_config_loader(
719721
config_base_path=None,
720722
**kwargs)
721723

724+
722725
def list_kube_config_contexts(config_file=None):
723726

724727
if config_file is None:
@@ -757,9 +760,10 @@ def load_kube_config(config_file=None, context=None,
757760
else:
758761
loader.load_and_set(client_configuration)
759762

763+
760764
def load_kube_config_from_dict(config_dict, context=None,
761-
client_configuration=None,
762-
persist_config=True):
765+
client_configuration=None,
766+
persist_config=True):
763767
"""Loads authentication and cluster information from config_dict file
764768
and stores them in kubernetes.client.configuration.
765769
@@ -788,6 +792,7 @@ def load_kube_config_from_dict(config_dict, context=None,
788792
else:
789793
loader.load_and_set(client_configuration)
790794

795+
791796
def new_client_from_config(
792797
config_file=None,
793798
context=None,

config/kube_config_test.py

+1
Original file line numberDiff line numberDiff line change
@@ -1380,6 +1380,7 @@ def test__get_kube_config_loader_dict_no_persist(self):
13801380
config_dict=self.TEST_KUBE_CONFIG)
13811381
self.assertIsNone(actual._config_persister)
13821382

1383+
13831384
class TestKubernetesClientConfiguration(BaseTestCase):
13841385
# Verifies properties of kubernetes.client.Configuration.
13851386
# These tests guard against changes to the upstream configuration class,

0 commit comments

Comments
 (0)