@@ -239,7 +239,7 @@ class WorkerPool(object):
239
239
"""
240
240
241
241
def __init__ (self , execmodel , hasprimary = False ):
242
- """ by default allow unlimited number of spawns. """
242
+ """by default allow unlimited number of spawns."""
243
243
self .execmodel = execmodel
244
244
self ._running_lock = self .execmodel .Lock ()
245
245
self ._running = set ()
@@ -316,12 +316,12 @@ def spawn(self, func, *args, **kwargs):
316
316
return reply
317
317
318
318
def terminate (self , timeout = None ):
319
- """ trigger shutdown and wait for completion of all executions. """
319
+ """trigger shutdown and wait for completion of all executions."""
320
320
self .trigger_shutdown ()
321
321
return self .waitall (timeout = timeout )
322
322
323
323
def waitall (self , timeout = None ):
324
- """ wait until all active spawns have finished executing. """
324
+ """wait until all active spawns have finished executing."""
325
325
with self ._running_lock :
326
326
if not self ._running :
327
327
return True
@@ -393,7 +393,7 @@ def __init__(self, outfile, infile, execmodel):
393
393
self .execmodel = execmodel
394
394
395
395
def read (self , numbytes ):
396
- """Read exactly 'numbytes' bytes from the pipe. """
396
+ """Read exactly 'numbytes' bytes from the pipe."""
397
397
# a file in non-blocking mode may return less bytes, so we loop
398
398
buf = bytes ()
399
399
while numbytes > len (buf ):
@@ -404,7 +404,7 @@ def read(self, numbytes):
404
404
return buf
405
405
406
406
def write (self , data ):
407
- """write out all data bytes. """
407
+ """write out all data bytes."""
408
408
assert isinstance (data , bytes )
409
409
self ._write (data )
410
410
self .outfile .flush ()
@@ -417,7 +417,7 @@ def close_write(self):
417
417
418
418
419
419
class Message :
420
- """ encapsulates Messages and their wire protocol. """
420
+ """encapsulates Messages and their wire protocol."""
421
421
422
422
_types = []
423
423
@@ -453,7 +453,7 @@ def __repr__(self):
453
453
454
454
455
455
class GatewayReceivedTerminate (Exception ):
456
- """ Receiverthread got termination message. """
456
+ """Receiverthread got termination message."""
457
457
458
458
459
459
def _setupmessages ():
@@ -525,7 +525,7 @@ def geterrortext(excinfo, format_exception=traceback.format_exception, sysex=sys
525
525
526
526
527
527
class RemoteError (Exception ):
528
- """ Exception containing a stringified error from the other side. """
528
+ """Exception containing a stringified error from the other side."""
529
529
530
530
def __init__ (self , formatted ):
531
531
self .formatted = formatted
@@ -544,7 +544,7 @@ def warn(self):
544
544
545
545
546
546
class TimeoutError (IOError ):
547
- """ Exception indicating that a timeout was reached. """
547
+ """Exception indicating that a timeout was reached."""
548
548
549
549
550
550
NO_ENDMARKER_WANTED = object ()
@@ -787,7 +787,7 @@ def __init__(self, gateway, startcount=1):
787
787
self ._list = list # needed during interp-shutdown
788
788
789
789
def new (self , id = None ):
790
- """ create a new Channel with 'id' (or create new id if None). """
790
+ """create a new Channel with 'id' (or create new id if None)."""
791
791
with self ._writelock :
792
792
if self .finished :
793
793
raise IOError ("connexion already closed: {}" .format (self .gateway ))
@@ -1011,11 +1011,11 @@ def _local_schedulexec(self, channel, sourcetask):
1011
1011
# _____________________________________________________________________
1012
1012
#
1013
1013
def newchannel (self ):
1014
- """ return a new independent channel. """
1014
+ """return a new independent channel."""
1015
1015
return self ._channelfactory .new ()
1016
1016
1017
1017
def join (self , timeout = None ):
1018
- """ Wait for receiverthread to terminate. """
1018
+ """Wait for receiverthread to terminate."""
1019
1019
self ._trace ("waiting for receiver thread to finish" )
1020
1020
self ._receivepool .waitall ()
1021
1021
@@ -1296,7 +1296,7 @@ def load_channel(self):
1296
1296
1297
1297
1298
1298
class opcode :
1299
- """ container for name -> num mappings. """
1299
+ """container for name -> num mappings."""
1300
1300
1301
1301
1302
1302
def _buildopcodes ():
@@ -1329,7 +1329,7 @@ def dumps(obj):
1329
1329
1330
1330
1331
1331
def dump (byteio , obj ):
1332
- """ write a serialized bytestring of the given obj to the given stream. """
1332
+ """write a serialized bytestring of the given obj to the given stream."""
1333
1333
_Serializer (write = byteio .write ).save (obj , versioned = True )
1334
1334
1335
1335
0 commit comments