From: Daniele Varrazzo Date: Sun, 8 Oct 2023 08:30:26 +0000 (+0100) Subject: docs: fix typos/grammar X-Git-Tag: pool-3.2.0~12^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8c7020b156b7fea6b73a66c66cc48242131d9ee;p=thirdparty%2Fpsycopg.git docs: fix typos/grammar Co-authored-by: Daniel Fortunov --- diff --git a/psycopg_pool/psycopg_pool/base_null_pool.py b/psycopg_pool/psycopg_pool/base_null_pool.py index 199e701d2..165ffcc86 100644 --- a/psycopg_pool/psycopg_pool/base_null_pool.py +++ b/psycopg_pool/psycopg_pool/base_null_pool.py @@ -1,5 +1,5 @@ """ -Psycopg mixin class null connection pools +Psycopg mixin class for null connection pools """ # Copyright (C) 2022 The Psycopg Team diff --git a/psycopg_pool/psycopg_pool/sched.py b/psycopg_pool/psycopg_pool/sched.py index 4a2848615..6b36f4b6c 100644 --- a/psycopg_pool/psycopg_pool/sched.py +++ b/psycopg_pool/psycopg_pool/sched.py @@ -2,12 +2,12 @@ # from the original file 'sched_async.py' # DO NOT CHANGE! Change the original file instead. """ -A minimal scheduler to schedule tasks run in the future. +A minimal scheduler to schedule tasks to run in the future. Inspired to the standard library `sched.scheduler`, but designed for -multi-thread usage ground up, not as an afterthought. Tasks can be scheduled in +multi-thread usage from the ground up, not as an afterthought. Tasks can be scheduled in front of the one currently running and `Scheduler.run()` can be left running -without any task scheduled. +without any tasks scheduled. Tasks are called "Task", not "Event", here, because we actually make use of `[threading/asyncio].Event` and the two would be confusing. @@ -28,7 +28,6 @@ logger = logging.getLogger(__name__) class Scheduler: def __init__(self) -> None: - """Initialize a new instance, passing the time and delay functions.""" self._queue: List[Task] = [] self._lock = Lock() self._event = Event() diff --git a/psycopg_pool/psycopg_pool/sched_async.py b/psycopg_pool/psycopg_pool/sched_async.py index db273dd1f..d69a0b0a3 100644 --- a/psycopg_pool/psycopg_pool/sched_async.py +++ b/psycopg_pool/psycopg_pool/sched_async.py @@ -1,10 +1,10 @@ """ -A minimal scheduler to schedule tasks run in the future. +A minimal scheduler to schedule tasks to run in the future. Inspired to the standard library `sched.scheduler`, but designed for -multi-thread usage ground up, not as an afterthought. Tasks can be scheduled in -front of the one currently running and `Scheduler.run()` can be left running -without any task scheduled. +multi-thread usage from the ground up, not as an afterthought. Tasks can be +scheduled in front of the one currently running and `Scheduler.run()` can be +left running without any tasks scheduled. Tasks are called "Task", not "Event", here, because we actually make use of `[threading/asyncio].Event` and the two would be confusing. @@ -25,7 +25,6 @@ logger = logging.getLogger(__name__) class AsyncScheduler: def __init__(self) -> None: - """Initialize a new instance, passing the time and delay functions.""" self._queue: List[Task] = [] self._lock = ALock() self._event = AEvent()