Commit 3ebd7ec6 authored by Wout De Nolf's avatar Wout De Nolf
Browse files

flake8 linting

parent 3f8990b0
......@@ -51,7 +51,7 @@ class RouterActor(AbstractActor):
self.dictValues = {}
def connect(self, actor, expectedValue="other"):
if expectedValue != "other" and not expectedValue in self.listPort:
if expectedValue != "other" and expectedValue not in self.listPort:
raise RuntimeError(
"Port {0} not defined for router actor {1}!".format(
expectedValue, self.name
......
......@@ -33,7 +33,7 @@ try:
from bson.objectid import ObjectId
USE_MONGODB = True
except:
except ImportError:
print(
"Error when trying to import pymongo and/or bson - no MongoDB connection possible"
)
......
......@@ -25,7 +25,6 @@ __date__ = "28/05/2019"
import os
import time
import pprint
import logging
import pathlib
......
......@@ -43,6 +43,6 @@ class TestThreadCountingActor(unittest.TestCase):
]
state = {"ntasks": Counter()}
with ThreadPoolExecutor(max_workers=10) as executor:
results = executor.map(lambda w: w.trigger(state), workers3)
executor.map(lambda w: w.trigger(state), workers3)
self.thread_counter.wait_threads_finished()
self.assertEqual(state["ntasks"].value, 150)
......@@ -62,7 +62,7 @@ class TestUtilsMongoDb(unittest.TestCase):
actorId1 = UtilsMongoDb.initActor(name=actorName1, workflowId=workflowId)
self.assertIsNotNone(actorId1)
actorName2 = "TestActor2"
actorId2 = UtilsMongoDb.initActor(name=actorName2, workflowId=workflowId)
UtilsMongoDb.initActor(name=actorName2, workflowId=workflowId)
inData = {"a": 1}
UtilsMongoDb.addDataToActor(
workflowId=workflowId, actorId=actorId1, actorData={"inData": inData}
......
......@@ -27,7 +27,6 @@ import logging
import unittest
from pypushflow.Workflow import Workflow
from pypushflow.Submodel import Submodel
from pypushflow.StopActor import StopActor
from pypushflow.StartActor import StartActor
from pypushflow.PythonActor import PythonActor
......
......@@ -31,7 +31,6 @@ from pypushflow.Submodel import Submodel
from pypushflow.StopActor import StopActor
from pypushflow.StartActor import StartActor
from pypushflow.PythonActor import PythonActor
from pypushflow.ErrorHandler import ErrorHandler
from pypushflow.ThreadCounter import ThreadCounter
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment