@@ -175,7 +175,7 @@ def load(_file):
175
175
def dumps (blocks ):
176
176
"""Dump to a string.
177
177
178
- :param UnspacedList block : The parsed tree
178
+ :param UnspacedList blocks : The parsed tree
179
179
:param int indentation: The number of spaces to indent
180
180
:rtype: str
181
181
@@ -186,7 +186,7 @@ def dumps(blocks):
186
186
def dump (blocks , _file ):
187
187
"""Dump to a file.
188
188
189
- :param UnspacedList block : The parsed tree
189
+ :param UnspacedList blocks : The parsed tree
190
190
:param file _file: The file to dump to
191
191
:param int indentation: The number of spaces to indent
192
192
:rtype: NoneType
@@ -354,12 +354,11 @@ def _coerce(self, inbound):
354
354
355
355
"""
356
356
if not isinstance (inbound , list ): # str or None
357
- return ( inbound , inbound )
357
+ return inbound , inbound
358
358
else :
359
359
if not hasattr (inbound , "spaced" ):
360
360
inbound = UnspacedList (inbound )
361
- return (inbound , inbound .spaced )
362
-
361
+ return inbound , inbound .spaced
363
362
364
363
def insert (self , i , x ):
365
364
item , spaced_item = self ._coerce (x )
@@ -388,12 +387,16 @@ def __add__(self, other):
388
387
389
388
def pop (self , _i = None ):
390
389
raise NotImplementedError ("UnspacedList.pop() not yet implemented" )
390
+
391
391
def remove (self , _ ):
392
392
raise NotImplementedError ("UnspacedList.remove() not yet implemented" )
393
+
393
394
def reverse (self ):
394
395
raise NotImplementedError ("UnspacedList.reverse() not yet implemented" )
396
+
395
397
def sort (self , _cmp = None , _key = None , _Rev = None ):
396
398
raise NotImplementedError ("UnspacedList.sort() not yet implemented" )
399
+
397
400
def __setslice__ (self , _i , _j , _newslice ):
398
401
raise NotImplementedError ("Slice operations on UnspacedLists not yet implemented" )
399
402
@@ -423,7 +426,7 @@ def is_dirty(self):
423
426
return any ((isinstance (x , list ) and x .is_dirty () for x in self ))
424
427
425
428
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"" "
427
430
pos = spaces = 0
428
431
# Normalize indexes like list[-1] etc, and save the result
429
432
if idx < 0 :
0 commit comments