Skip to content

Commit 0a81006

Browse files
committed
Formatting hygiene
1 parent b3182a2 commit 0a81006

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

src/cisco_gnmi/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def subscribe_xpaths(
277277
sample_interval=_NS_IN_S * 10,
278278
suppress_redundant=False,
279279
heartbeat_interval=None,
280-
prefix=None
280+
prefix=None,
281281
):
282282
"""A convenience wrapper of subscribe() which aids in building of SubscriptionRequest
283283
with request as subscribe SubscriptionList. This method accepts an iterable of simply xpath strings,

src/cisco_gnmi/nx.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class NXClient(Client):
5656
>>> capabilities = client.capabilities()
5757
>>> print(capabilities)
5858
"""
59+
5960
def delete_xpaths(self, xpaths, prefix=None):
6061
"""A convenience wrapper for set() which constructs Paths from supplied xpaths
6162
to be passed to set() as the delete parameter.
@@ -90,7 +91,13 @@ def delete_xpaths(self, xpaths, prefix=None):
9091
paths.append(self.parse_xpath_to_gnmi_path(xpath))
9192
return self.set(deletes=paths)
9293

93-
def set_json(self, update_json_configs=None, replace_json_configs=None, ietf=False, prefix=None):
94+
def set_json(
95+
self,
96+
update_json_configs=None,
97+
replace_json_configs=None,
98+
ietf=False,
99+
prefix=None,
100+
):
94101
"""A convenience wrapper for set() which assumes JSON payloads and constructs desired messages.
95102
All parameters are optional, but at least one must be present.
96103
@@ -295,11 +302,15 @@ def parse_xpath_to_gnmi_path(cls, xpath, origin=None):
295302
"""
296303
if origin is None:
297304
if any(
298-
map(xpath.startswith, [
299-
"Cisco-NX-OS-device",
300-
"/Cisco-NX-OS-device",
301-
"cisco-nx-os-device",
302-
"/cisco-nx-os-device"])
305+
map(
306+
xpath.startswith,
307+
[
308+
"Cisco-NX-OS-device",
309+
"/Cisco-NX-OS-device",
310+
"cisco-nx-os-device",
311+
"/cisco-nx-os-device",
312+
],
313+
)
303314
):
304315
origin = "device"
305316
# Remove the module

src/cisco_gnmi/xe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def subscribe_xpaths(
230230
sample_interval=Client._NS_IN_S * 10,
231231
suppress_redundant=False,
232232
heartbeat_interval=None,
233-
prefix=None
233+
prefix=None,
234234
):
235235
"""A convenience wrapper of subscribe() which aids in building of SubscriptionRequest
236236
with request as subscribe SubscriptionList. This method accepts an iterable of simply xpath strings,
@@ -309,7 +309,7 @@ def subscribe_xpaths(
309309
sample_interval,
310310
suppress_redundant,
311311
heartbeat_interval,
312-
prefix
312+
prefix,
313313
)
314314

315315
@classmethod

0 commit comments

Comments
 (0)