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:
Harry Mellor
2026-09-16 16:44:29 +00:00
committed by GitHub
co-authored by Claude Opus 5
parent 804e5377aa
commit 8c1557a79c
2002 changed files with 15024 additions and 14269 deletions
+17 -15
View File
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""
ExampleSecondaryTierManager: A simple in-memory secondary tier.
"""ExampleSecondaryTierManager: A simple in-memory secondary tier.
This implementation provides a minimal secondary tier that stores chunks
in memory (using a dictionary) with immediate completion. It serves as a
@@ -35,8 +34,7 @@ if TYPE_CHECKING:
class ExampleSecondaryTierManager(SecondaryTierManager):
"""
A simple in-memory secondary tier.
"""A simple in-memory secondary tier.
This implementation:
- Stores chunks in a dictionary (key -> True)
@@ -52,11 +50,14 @@ class ExampleSecondaryTierManager(SecondaryTierManager):
tier_type: str,
custom_param: int = 0,
):
"""
Initialize the example secondary tier.
"""Initialize the example secondary tier.
Args:
offloading_spec: The offloading spec this tier belongs to.
primary_kv_view: Memoryview over the primary tier's KV buffer.
tier_type: Name identifying this tier type.
custom_param: Dummy parameter demonstrating custom args.
"""
super().__init__(
offloading_spec=offloading_spec,
@@ -78,8 +79,7 @@ class ExampleSecondaryTierManager(SecondaryTierManager):
@override
def lookup(self, key: OffloadKey, req_context: ReqContext) -> LookupResult:
"""
Check whether a chunk exists in this secondary tier.
"""Check whether a chunk exists in this secondary tier.
Args:
key: Offload key to look up.
@@ -87,17 +87,18 @@ class ExampleSecondaryTierManager(SecondaryTierManager):
Returns:
HIT if the chunk is present, MISS if not found.
"""
return LookupResult.HIT if key in self.chunks else LookupResult.MISS
@override
def submit_store(self, job_metadata: TransferJob) -> None:
"""
Submit a job to store chunks from primary tier to this tier.
"""Submit a job to store chunks from primary tier to this tier.
Args:
job_metadata: Job metadata including job_id, keys, and
spec for reading chunks from the primary tier.
"""
keys = job_metadata.keys
chunk_ids = job_metadata.chunk_ids
@@ -118,12 +119,12 @@ class ExampleSecondaryTierManager(SecondaryTierManager):
@override
def submit_load(self, job_metadata: TransferJob) -> None:
"""
Submit a job to load chunks from this tier to primary tier.
"""Submit a job to load chunks from this tier to primary tier.
Args:
job_metadata: Job metadata including job_id, keys, and
spec for writing chunks into the primary tier.
"""
keys = job_metadata.keys
chunk_ids = job_metadata.chunk_ids
@@ -149,12 +150,12 @@ class ExampleSecondaryTierManager(SecondaryTierManager):
@override
def get_finished_jobs(self) -> Iterable[JobResult]:
"""
Poll for finished jobs.
"""Poll for finished jobs.
Returns:
Iterable of JobResult objects for all jobs that have
finished since the last call.
"""
result = self.completed_jobs
self.completed_jobs = []
@@ -167,7 +168,8 @@ class ExampleSecondaryTierManager(SecondaryTierManager):
@override
def drain_jobs(self) -> None:
"""Synchronous tier — submit_*() returns only after the operation
completes, so there is nothing to wait for."""
completes, so there is nothing to wait for.
"""
return
def get_num_chunks(self) -> int: