[PATCH 27 of 52 Narval cube] [autopep8] E20 - Remove extraneous whitespace

Nsukami Patrick ptrck at nskm.xyz
Wed Apr 1 11:34:27 CEST 2020


# HG changeset patch
# User Nsukami Patrick <ptrck at nskm dot xyz>
# Date 1585460417 0
#      Sun Mar 29 05:40:17 2020 +0000
# Node ID 6948c7b7d85e0caa13a36fdf5bfcc9e77de85b65
# Parent  63dcef285b13257c2c4e5b444379129ff84ac7f6
[autopep8] E20 - Remove extraneous whitespace

diff --git a/cubicweb_narval/narvalbot/__init__.py b/cubicweb_narval/narvalbot/__init__.py
--- a/cubicweb_narval/narvalbot/__init__.py
+++ b/cubicweb_narval/narvalbot/__init__.py
@@ -87,7 +87,7 @@
     options = (
         # main options
         ('uid',
-         {'type' : 'string',
+         {'type': 'string',
           'default': None,
           'help': 'if this option is set, use the specified user to start \
 the daemon rather than the user running the command',
@@ -96,31 +96,31 @@
 
         # process control
         ('threads',
-         {'type' : 'int', 'short': 'T',
+         {'type': 'int', 'short': 'T',
           'default': 2,
           'help': 'number of plans which may be run in parallel',
           'group': 'process-control', 'level': 2,
           }),
         ('max-cpu-time',
-         {'type' : 'time',
+         {'type': 'time',
           'default': None,
           'help': 'maximum CPU Time in second that may be used to execute a test.',
           'group': 'process-control', 'level': 2,
           }),
         ('max-time',
-         {'type' : 'time',
+         {'type': 'time',
           'default': None,
           'help': 'maximum Real Time in second that may be used to execute a test.',
           'group': 'process-control', 'level': 2,
           }),
         ('max-memory',
-         {'type' : 'bytes',
+         {'type': 'bytes',
           'default': None,
           'help': 'maximum Memory in bytes the test can allocate.',
           'group': 'process-control', 'level': 2,
           }),
         ('max-reprieve',
-         {'type' : 'time',
+         {'type': 'time',
           'default': 60,
           'help': 'delay in second while the test try to abort nicely (reporting '
           'the error and cleaning up the environement before it\'s killed).',
@@ -129,19 +129,19 @@
 
         # server control
         ('log-file',
-         {'type' : 'string',
+         {'type': 'string',
           'default': Method('_log_file'),
           'help': 'file where output logs should be written',
           'group': 'daemon', 'level': 2,
           }),
         ('log-threshold',
-         {'type' : 'string', # XXX use a dedicated type?
+         {'type': 'string', # XXX use a dedicated type?
           'default': 'INFO',
           'help': 'narval bot\'s log level',
           'group': 'daemon', 'level': 1,
           }),
         ('poll-delay',
-         {'type' : 'time',
+         {'type': 'time',
           'default': 60,
           'help': 'delay in seconds while the server waits before looking for '
           'new pending plans ',
diff --git a/cubicweb_narval/narvalbot/main.py b/cubicweb_narval/narvalbot/main.py
--- a/cubicweb_narval/narvalbot/main.py
+++ b/cubicweb_narval/narvalbot/main.py
@@ -36,11 +36,11 @@
     arguments = '[<cw instance id>...]'
     options = (
         ('debug',
-         {'action' : 'store_true', 'short': 'D',
+         {'action': 'store_true', 'short': 'D',
           'help': 'start in debug mode',
           }),
         ('pid-file',
-         {'type' : 'string',
+         {'type': 'string',
           'help': 'daemon\'s pid file',
           }),
 
diff --git a/cubicweb_narval/narvalbot/server.py b/cubicweb_narval/narvalbot/server.py
--- a/cubicweb_narval/narvalbot/server.py
+++ b/cubicweb_narval/narvalbot/server.py
@@ -183,7 +183,7 @@
         # start a thread to wait for the end of the child process
         thread = Thread(target=self._run_task, args=(task,))
         with self._cvar:
-            self._running_tasks.add( (thread, task) )
+            self._running_tasks.add((thread, task))
         thread.start()
 
     def _run_task(self, task):
@@ -192,7 +192,7 @@
             self._spawn_task_process(task)
         finally:
             with self._cvar:
-                self._running_tasks.remove( (currentThread(), task) )
+                self._running_tasks.remove((currentThread(), task))
                 self._cvar.notify()
             self.info('task %s finished', task.id)
 
diff --git a/cubicweb_narval/site_cubicweb.py b/cubicweb_narval/site_cubicweb.py
--- a/cubicweb_narval/site_cubicweb.py
+++ b/cubicweb_narval/site_cubicweb.py
@@ -2,8 +2,8 @@
 options = (
     # XXX only for all-in-one or repository config
     ('plan-cleanup-delay',
-     {'type' : 'time',
-      'default' : '60d',
+     {'type': 'time',
+      'default': '60d',
       'help': ('Interval of time after which plans can be '
                'deleted. Default to 60 days. Set it to 0 if you don\'t '
                'want automatic deletion.'),




More information about the cubicweb-devel mailing list