Skip to content

Commit c376ef7

Browse files
committed
[REF] remove explicit 'object' inheritance
1 parent e6d5e01 commit c376ef7

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

queue_job/delay.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def _execute_direct(self):
609609
self._generated_job.perform()
610610

611611

612-
class DelayableRecordset(object):
612+
class DelayableRecordset:
613613
"""Allow to delay a method for a recordset (shortcut way)
614614
615615
Usage::

queue_job/job.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def identity_exact_hasher(job_):
105105

106106

107107
@total_ordering
108-
class Job(object):
108+
class Job:
109109
"""A Job is a task to execute. It is the in-memory representation of a job.
110110
111111
Jobs are stored in the ``queue.job`` Odoo Model, but they are handled

queue_job/jobrunner/channels.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
_logger = logging.getLogger(__name__)
1515

1616

17-
class PriorityQueue(object):
17+
class PriorityQueue:
1818
"""A priority queue that supports removing arbitrary objects.
1919
2020
Adding an object already in the queue is a no op.
@@ -103,7 +103,7 @@ def pop(self):
103103

104104

105105
@total_ordering
106-
class ChannelJob(object):
106+
class ChannelJob:
107107
"""A channel job is attached to a channel and holds the properties of a
108108
job that are necessary to prioritise them.
109109
@@ -205,7 +205,7 @@ def __lt__(self, other):
205205
return self.sorting_key() < other.sorting_key()
206206

207207

208-
class ChannelQueue(object):
208+
class ChannelQueue:
209209
"""A channel queue is a priority queue for jobs.
210210
211211
Jobs with an eta are set aside until their eta is past due, at
@@ -334,7 +334,7 @@ def get_wakeup_time(self, wakeup_time=0):
334334
return wakeup_time
335335

336336

337-
class Channel(object):
337+
class Channel:
338338
"""A channel for jobs, with a maximum capacity.
339339
340340
When jobs are created by queue_job modules, they may be associated
@@ -581,7 +581,7 @@ def split_strip(s, sep, maxsplit=-1):
581581
return [x.strip() for x in s.split(sep, maxsplit)]
582582

583583

584-
class ChannelManager(object):
584+
class ChannelManager:
585585
"""High level interface for channels
586586
587587
This class handles:

queue_job/jobrunner/runner.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def urlopen():
259259
thread.start()
260260

261261

262-
class Database(object):
262+
class Database:
263263
def __init__(self, db_name):
264264
self.db_name = db_name
265265
connection_info = _connection_info_for(db_name)
@@ -344,7 +344,7 @@ def set_job_enqueued(self, uuid):
344344
)
345345

346346

347-
class QueueJobRunner(object):
347+
class QueueJobRunner:
348348
def __init__(
349349
self,
350350
scheme="http",

test_queue_job/tests/test_job.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def test_infinite_retryable_error(self):
8989
self.assertEqual(test_job.retry, 1)
9090

9191
def test_on_instance_method(self):
92-
class A(object):
92+
class A:
9393
def method(self):
9494
pass
9595

0 commit comments

Comments
 (0)