From 83382f51d03371e2c1519be63958e1929513aca5 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Wed, 7 May 2014 21:21:25 +0200 Subject: [PATCH] PEP8ify. --- rq/queue.py | 4 ++-- rq/timeouts.py | 2 +- rq/utils.py | 4 +++- rq/worker.py | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/rq/queue.py b/rq/queue.py index 6c4c791..4296001 100644 --- a/rq/queue.py +++ b/rq/queue.py @@ -166,8 +166,8 @@ class Queue(object): # TODO: job with dependency shouldn't have "queued" as status job = self.job_class.create(func, args, kwargs, connection=self.connection, - result_ttl=result_ttl, status=Status.QUEUED, - description=description, depends_on=depends_on, timeout=timeout) + result_ttl=result_ttl, status=Status.QUEUED, + description=description, depends_on=depends_on, timeout=timeout) # If job depends on an unfinished job, register itself on it's # parent's dependents instead of enqueueing it. diff --git a/rq/timeouts.py b/rq/timeouts.py index afe385d..a7b1242 100644 --- a/rq/timeouts.py +++ b/rq/timeouts.py @@ -1,4 +1,4 @@ - # -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) diff --git a/rq/utils.py b/rq/utils.py index e1786cb..1f8a4b1 100644 --- a/rq/utils.py +++ b/rq/utils.py @@ -20,7 +20,9 @@ from .compat import is_python_version def gettermsize(): def ioctl_GWINSZ(fd): try: - import fcntl, termios, struct # noqa + import fcntl + import struct + import termios cr = struct.unpack('hh', fcntl.ioctl(fd, termios.TIOCGWINSZ, '1234')) except: return None diff --git a/rq/worker.py b/rq/worker.py index 8262159..a269620 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -382,7 +382,7 @@ class Worker(object): try: result = self.queue_class.dequeue_any(self.queues, timeout, - connection=self.connection) + connection=self.connection) if result is not None: job, queue = result self.log.info('%s: %s (%s)' % (green(queue.name),