From 49ad6e8e838afe1fb906b1d27c24ee3193777686 Mon Sep 17 00:00:00 2001 From: Justin Campbell Date: Mon, 2 Aug 2021 18:19:15 -0400 Subject: [PATCH] Docs cleanup --- src/webqueue2api/parser/queue.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/webqueue2api/parser/queue.py b/src/webqueue2api/parser/queue.py index 1ab1d6c..ceb1eb0 100644 --- a/src/webqueue2api/parser/queue.py +++ b/src/webqueue2api/parser/queue.py @@ -186,30 +186,23 @@ def get_queue_counts() -> list: return sorted_queue_info -def load_queues(*queues, headers_only: bool = True) -> list: - """Returns a list of queues - - Example: - [example] +def load_queues(*queues: tuple, headers_only: bool = True) -> list: + """Returns a list of queues. Args: headers_only (bool, optional): Weather or not the content of items in the queue should be loaded. Defaults to True. - *queues: List of strings that represent Queue names. + *queues (tuple): List of strings that represent Queue names. Returns: - list: A list of all the queues that were given as arguments, or all of the queues if no queues were specified + list: A list of all the queues that were given as arguments, or all of the queues if no queues were specified. """ - # custom class creation based on stackoverflow answer + # Custom mutliprocessing classes to allow for nested multi-threading. class NoDaemonProcess(multiprocessing.Process): - # make 'daemon' attribute always return False def _get_daemon(self): return False def _set_daemon(self, value): pass daemon = property(_get_daemon, _set_daemon) - - # We sub-class multiprocessing.pool.Pool instead of multiprocessing.Pool - # because the latter is only a wrapper function, not a proper class. class MyPool(multiprocessing.pool.Pool): Process = NoDaemonProcess