summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Lib/queue.py
diff options
context:
space:
mode:
authorshadchin <[email protected]>2022-02-10 16:44:30 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:44:30 +0300
commit2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch)
tree012bb94d777798f1f56ac1cec429509766d05181 /contrib/tools/python3/src/Lib/queue.py
parent6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Lib/queue.py')
-rw-r--r--contrib/tools/python3/src/Lib/queue.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/tools/python3/src/Lib/queue.py b/contrib/tools/python3/src/Lib/queue.py
index 10dbcbc18ec..bbd5db5aa2c 100644
--- a/contrib/tools/python3/src/Lib/queue.py
+++ b/contrib/tools/python3/src/Lib/queue.py
@@ -1,7 +1,7 @@
'''A multi-producer, multi-consumer queue.'''
import threading
-import types
+import types
from collections import deque
from heapq import heappush, heappop
from time import monotonic as time
@@ -15,7 +15,7 @@ __all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue', 'SimpleQueue'
try:
from _queue import Empty
-except ImportError:
+except ImportError:
class Empty(Exception):
'Exception raised by Queue.get(block=0)/get_nowait().'
pass
@@ -217,9 +217,9 @@ class Queue:
def _get(self):
return self.queue.popleft()
- __class_getitem__ = classmethod(types.GenericAlias)
-
+ __class_getitem__ = classmethod(types.GenericAlias)
+
class PriorityQueue(Queue):
'''Variant of Queue that retrieves open entries in priority order (lowest first).
@@ -319,8 +319,8 @@ class _PySimpleQueue:
'''Return the approximate size of the queue (not reliable!).'''
return len(self._queue)
- __class_getitem__ = classmethod(types.GenericAlias)
-
+ __class_getitem__ = classmethod(types.GenericAlias)
+
if SimpleQueue is None:
SimpleQueue = _PySimpleQueue