From 42d29ca1f64a3118ec548e84b7afa1bdc5689383 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 23 Apr 2020 18:33:57 +0200 Subject: [PATCH] LINT fixes --- platypush/backend/http/poll/__init__.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/platypush/backend/http/poll/__init__.py b/platypush/backend/http/poll/__init__.py index 52dccea27..e176805f5 100644 --- a/platypush/backend/http/poll/__init__.py +++ b/platypush/backend/http/poll/__init__.py @@ -1,12 +1,8 @@ import importlib import time -from threading import Thread - -from platypush.bus import Bus from platypush.backend import Backend from platypush.backend.http.request import HttpRequest -from platypush.message.request import Request class HttpPollBackend(Backend): @@ -60,8 +56,8 @@ class HttpPollBackend(Backend): for request in requests: if isinstance(request, dict): - type = request['type'] - (module, name) = ('.'.join(type.split('.')[:-1]), type.split('.')[-1]) + req_type = request['type'] + (module, name) = ('.'.join(req_type.split('.')[:-1]), req_type.split('.')[-1]) module = importlib.import_module(module) request = getattr(module, name)(**request) elif not isinstance(request, HttpRequest): @@ -71,7 +67,6 @@ class HttpPollBackend(Backend): request.bus = self.bus self.requests.append(request) - def run(self): super().run() @@ -84,4 +79,3 @@ class HttpPollBackend(Backend): # vim:sw=4:ts=4:et: -