diff options
author | Omer Katz <omer.drow@gmail.com> | 2020-07-13 16:58:06 +0300 |
---|---|---|
committer | Omer Katz <omer.drow@gmail.com> | 2020-07-13 16:58:06 +0300 |
commit | 7a6e7cc45b9afe799770313a66c4211d1986ff30 (patch) | |
tree | 189c7fa2e7ca9835e14975093c12b7e5d3d8213b /kombu/asynchronous/timer.py | |
parent | 016f4accb634ebc3eb8fc66741f23552e5966ea7 (diff) | |
download | kombu-7a6e7cc45b9afe799770313a66c4211d1986ff30.tar.gz |
pyupgrade
Diffstat (limited to 'kombu/asynchronous/timer.py')
-rw-r--r-- | kombu/asynchronous/timer.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kombu/asynchronous/timer.py b/kombu/asynchronous/timer.py index 5eda12f3..d159ab15 100644 --- a/kombu/asynchronous/timer.py +++ b/kombu/asynchronous/timer.py @@ -1,6 +1,4 @@ -# -*- coding: utf-8 -*- """Timer scheduling Python callbacks.""" -from __future__ import absolute_import, unicode_literals import heapq import sys @@ -47,7 +45,7 @@ def to_timestamp(d, default_timezone=utc, time=monotonic): @total_ordering @python_2_unicode_compatible -class Entry(object): +class Entry: """Schedule Entry.""" if not IS_PYPY: # pragma: no cover @@ -74,7 +72,7 @@ class Entry(object): pass def __repr__(self): - return '<TimerEntry: {0}(*{1!r}, **{2!r})'.format( + return '<TimerEntry: {}(*{!r}, **{!r})'.format( self.fun.__name__, self.args, self.kwargs) # must not use hash() to order entries @@ -90,7 +88,7 @@ class Entry(object): self.canceled = value -class Timer(object): +class Timer: """Async timer implementation.""" Entry = Entry |