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

Commit f30d840

Browse files
authored
Merge pull request #115 from iamneha/pycodestylw
Update pycodestyle
2 parents 2d69e89 + 0fc0d40 commit f30d840

File tree

5 files changed

+23
-14
lines changed

5 files changed

+23
-14
lines changed

config/exec_provider.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@
2323

2424
class ExecProvider(object):
2525
"""
26-
Implementation of the proposal for out-of-tree client authentication providers
27-
as described here --
28-
https://github.com/kubernetes/community/blob/master/contributors/design-proposals/auth/kubectl-exec-plugins.md
26+
Implementation of the proposal for out-of-tree client
27+
authentication providers as described here --
28+
https://github.com/kubernetes/community/blob/master/contributors
29+
/design-proposals/auth/kubectl-exec-plugins.md
2930
3031
Missing from implementation:
3132

config/incluster_config.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def _set_config(self):
8787

8888

8989
def load_incluster_config():
90-
"""Use the service account kubernetes gives to pods to connect to kubernetes
90+
"""
91+
Use the service account kubernetes gives to pods to connect to kubernetes
9192
cluster. It's intended for clients that expect to be running inside a pod
9293
running on kubernetes. It will raise an exception if called from a process
9394
not running in a kubernetes environment."""

config/kube_config.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -556,9 +556,11 @@ def new_client_from_config(
556556
config_file=None,
557557
context=None,
558558
persist_config=True):
559-
"""Loads configuration the same as load_kube_config but returns an ApiClient
559+
"""
560+
Loads configuration the same as load_kube_config but returns an ApiClient
560561
to be used with any API object. This will allow the caller to concurrently
561-
talk with multiple clusters."""
562+
talk with multiple clusters.
563+
"""
562564
client_config = type.__call__(Configuration)
563565
load_kube_config(config_file=config_file, context=context,
564566
client_configuration=client_config,

hack/boilerplate/boilerplate.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
def get_refs():
5353
refs = {}
5454

55-
for path in glob.glob(os.path.join(args.boilerplate_dir, "boilerplate.*.txt")):
55+
for path in glob.glob(os.path.join(
56+
args.boilerplate_dir, "boilerplate.*.txt")):
5657
extension = os.path.basename(path).split(".")[1]
5758

5859
ref_file = open(path, 'r')
@@ -105,7 +106,7 @@ def file_passes(filename, refs, regexs):
105106
filename, file=verbose_out)
106107
return False
107108

108-
# Replace all occurrences of the regex "2014|2015|2016|2017|2018" with "YEAR"
109+
# Replace all occurrences of regex "2014|2015|2016|2017|2018" with "YEAR"
109110
p = regexs["date"]
110111
for i, d in enumerate(data):
111112
(data[i], found) = p.subn('YEAR', d)
@@ -118,7 +119,8 @@ def file_passes(filename, refs, regexs):
118119
filename, file=verbose_out)
119120
if args.verbose:
120121
print(file=verbose_out)
121-
for line in difflib.unified_diff(ref, data, 'reference', filename, lineterm=''):
122+
for line in difflib.unified_diff(
123+
ref, data, 'reference', filename, lineterm=''):
122124
print(line, file=verbose_out)
123125
print(file=verbose_out)
124126
return False
@@ -171,9 +173,11 @@ def get_dates():
171173

172174
def get_regexs():
173175
regexs = {}
174-
# Search for "YEAR" which exists in the boilerplate, but shouldn't in the real thing
176+
# Search for "YEAR" which exists in the boilerplate,
177+
# but shouldn't in the real thing
175178
regexs["year"] = re.compile('YEAR')
176-
# get_dates return 2014, 2015, 2016, 2017, or 2018 until the current year as a regex like: "(2014|2015|2016|2017|2018)";
179+
# get_dates return 2014, 2015, 2016, 2017, or 2018 until the current year
180+
# as a regex like: "(2014|2015|2016|2017|2018)";
177181
# company holder names can be anything
178182
regexs["date"] = re.compile(get_dates())
179183
# strip #!.* from shell scripts

stream/ws_client.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ def __init__(self, configuration, url, headers):
5353
header.append("authorization: %s" % headers['authorization'])
5454

5555
if headers and 'sec-websocket-protocol' in headers:
56-
header.append("sec-websocket-protocol: %s" % headers['sec-websocket-protocol'])
56+
header.append("sec-websocket-protocol: %s" %
57+
headers['sec-websocket-protocol'])
5758
else:
5859
header.append("sec-websocket-protocol: v4.channel.k8s.io")
5960

@@ -186,8 +187,8 @@ def update(self, timeout=0):
186187
data = data[1:]
187188
if data:
188189
if channel in [STDOUT_CHANNEL, STDERR_CHANNEL]:
189-
# keeping all messages in the order they received for
190-
# non-blocking call.
190+
# keeping all messages in the order they received
191+
# for non-blocking call.
191192
self._all += data
192193
if channel not in self._channels:
193194
self._channels[channel] = data

0 commit comments

Comments
 (0)