Add pydocstyle to the ruff rules (#52136)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Harry Mellor <hej.mellor@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
804e5377aa
commit
8c1557a79c
@@ -1,11 +1,10 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
"""
|
||||
Thread pool:
|
||||
Two queues (load, store) and two sets of threads:
|
||||
- Load-priority threads: drain the load queue first, then the store queue.
|
||||
- Store-priority threads: drain the store queue first, then the load queue.
|
||||
Load jobs are enqueued to the load queue; store jobs to the store queue.
|
||||
"""Thread pool:
|
||||
Two queues (load, store) and two sets of threads:
|
||||
- Load-priority threads: drain the load queue first, then the store queue.
|
||||
- Store-priority threads: drain the store queue first, then the load queue.
|
||||
Load jobs are enqueued to the load queue; store jobs to the store queue.
|
||||
"""
|
||||
|
||||
import threading
|
||||
@@ -20,8 +19,7 @@ logger = init_logger(__name__)
|
||||
|
||||
|
||||
class JobState:
|
||||
"""
|
||||
Thread-safe completion tracker for a set of per-block I/O tasks.
|
||||
"""Thread-safe completion tracker for a set of per-block I/O tasks.
|
||||
|
||||
Each task calls task_done(success) when it finishes.
|
||||
"""
|
||||
@@ -50,7 +48,7 @@ class JobState:
|
||||
def task_done(
|
||||
self, success: bool, transfer_time: float
|
||||
) -> tuple[bool, bool, float]:
|
||||
"""Returns if job completed and success flag"""
|
||||
"""Returns if job completed and success flag."""
|
||||
with self._lock:
|
||||
self._completed += 1
|
||||
self._transfer_time += transfer_time
|
||||
@@ -60,8 +58,7 @@ class JobState:
|
||||
|
||||
|
||||
class DualQueueThreadPool:
|
||||
"""
|
||||
Thread pool with two task queues (load and store) and two thread groups.
|
||||
"""Thread pool with two task queues (load and store) and two thread groups.
|
||||
|
||||
Load-priority threads drain the load queue first, then fall back to the
|
||||
store queue. Store-priority threads do the reverse. Both queues share
|
||||
|
||||
Reference in New Issue
Block a user