Skip to content

Commit 4ba0b44

Browse files
committed
minor pep-8 fixes
1 parent 5e1c21d commit 4ba0b44

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

nginxparser_eb/__init__.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def load(_file):
175175
def dumps(blocks):
176176
"""Dump to a string.
177177
178-
:param UnspacedList block: The parsed tree
178+
:param UnspacedList blocks: The parsed tree
179179
:param int indentation: The number of spaces to indent
180180
:rtype: str
181181
@@ -186,7 +186,7 @@ def dumps(blocks):
186186
def dump(blocks, _file):
187187
"""Dump to a file.
188188
189-
:param UnspacedList block: The parsed tree
189+
:param UnspacedList blocks: The parsed tree
190190
:param file _file: The file to dump to
191191
:param int indentation: The number of spaces to indent
192192
:rtype: NoneType
@@ -354,12 +354,11 @@ def _coerce(self, inbound):
354354
355355
"""
356356
if not isinstance(inbound, list): # str or None
357-
return (inbound, inbound)
357+
return inbound, inbound
358358
else:
359359
if not hasattr(inbound, "spaced"):
360360
inbound = UnspacedList(inbound)
361-
return (inbound, inbound.spaced)
362-
361+
return inbound, inbound.spaced
363362

364363
def insert(self, i, x):
365364
item, spaced_item = self._coerce(x)
@@ -388,12 +387,16 @@ def __add__(self, other):
388387

389388
def pop(self, _i=None):
390389
raise NotImplementedError("UnspacedList.pop() not yet implemented")
390+
391391
def remove(self, _):
392392
raise NotImplementedError("UnspacedList.remove() not yet implemented")
393+
393394
def reverse(self):
394395
raise NotImplementedError("UnspacedList.reverse() not yet implemented")
396+
395397
def sort(self, _cmp=None, _key=None, _Rev=None):
396398
raise NotImplementedError("UnspacedList.sort() not yet implemented")
399+
397400
def __setslice__(self, _i, _j, _newslice):
398401
raise NotImplementedError("Slice operations on UnspacedLists not yet implemented")
399402

@@ -423,7 +426,7 @@ def is_dirty(self):
423426
return any((isinstance(x, list) and x.is_dirty() for x in self))
424427

425428
def _spaced_position(self, idx):
426-
"Convert from indexes in the unspaced list to positions in the spaced one"
429+
"""Convert from indexes in the unspaced list to positions in the spaced one"""
427430
pos = spaces = 0
428431
# Normalize indexes like list[-1] etc, and save the result
429432
if idx < 0:

0 commit comments

Comments
 (0)