aboutsummaryrefslogtreecommitdiffstats
path: root/packaging-tools/threadedwork.py
diff options
context:
space:
mode:
authorPatrik Teivonen <patrik.teivonen@qt.io>2022-06-16 14:01:51 +0300
committerPatrik Teivonen <patrik.teivonen@qt.io>2022-07-11 09:41:00 +0000
commit43f6e2ced0724182f5d31e3d1a7c19093626a341 (patch)
treef926ac578ed320a8aedaa8d76c3265751bcada8e /packaging-tools/threadedwork.py
parent8399adccfaf316ac8bd51f511a3e0cd8328aaa51 (diff)
PEP8: Fix whitespace
Fix whitespace, Enable following checks in flake8: - E225 Missing whitespace around operator (E225) - E226 Missing whitespace around arithmetic operator (E226) - E231 Missing whitespace after ',', ';', or ':' (E231) - E221 Multiple spaces before operator (E221) - E201 Whitespace after '(' (E201) - E252 Missing whitespace around parameter equals - E251 Unexpected spaces around keyword / parameter equals - E202 Whitespace before ')' (E202) - E222 Multiple spaces after operator (E222) - E211 Whitespace before '(' (E211) Change-Id: Ib14a4a83dbc06cdfac511eb09912d7b9232df7e6 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'packaging-tools/threadedwork.py')
-rw-r--r--packaging-tools/threadedwork.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/packaging-tools/threadedwork.py b/packaging-tools/threadedwork.py
index 6ea1b63be..f35140cf5 100644
--- a/packaging-tools/threadedwork.py
+++ b/packaging-tools/threadedwork.py
@@ -98,7 +98,7 @@ __builtin__.org_stdout = sys.stdout
__builtin__.org_sterr = sys.stderr
-def enableThreadedPrint(enable = True, threadCount = multiprocessing.cpu_count()):
+def enableThreadedPrint(enable=True, threadCount=multiprocessing.cpu_count()):
if enable:
global outputStates
global outputFormatString
@@ -134,7 +134,7 @@ class TaskFunction():
class Task():
- def __init__(self, description, function = None, *arguments):
+ def __init__(self, description, function=None, *arguments):
self.taskNumber = 0 # will be set from outside
self.description = description
self.listOfFunctions = []
@@ -188,7 +188,7 @@ class ThreadedWork():
if self.exitFunction:
task.exitFunction = self.exitFunction
task.exitFunctionArguments = self.exitFunctionArguments
- self.legend.append(("{:d}: " + os.linesep +"\t{}" + os.linesep).format(task.taskNumber, task.description))
+ self.legend.append(("{:d}: " + os.linesep + "\t{}" + os.linesep).format(task.taskNumber, task.description))
self.queue.put(task)
self.taskNumber = self.taskNumber + 1
@@ -231,7 +231,7 @@ class Consumer(threading.Thread):
self.workerThreadId = workerThreadId
threading.Thread.__init__(self)
- def run(self, stableRunIndicator = True):
+ def run(self, stableRunIndicator=True):
if stableRunIndicator:
threadData.progressIndicator = itertools.cycle(['..'])
else: