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
+8 -9
View File
@@ -55,8 +55,7 @@ class WorkerBase:
distributed_init_method: str,
is_driver_worker: bool = False,
) -> None:
"""
Initialize common worker components.
"""Initialize common worker components.
Args:
vllm_config: Complete vLLM configuration
@@ -65,6 +64,7 @@ class WorkerBase:
distributed_init_method: Distributed initialization method
is_driver_worker: Whether this worker handles driver
responsibilities
"""
self.vllm_config = vllm_config
self.model_config = vllm_config.model_config
@@ -118,6 +118,7 @@ class WorkerBase:
Returns:
Compilation times (language_model, encoder) in seconds.
"""
raise NotImplementedError
@@ -127,7 +128,8 @@ class WorkerBase:
def synchronize_device(self) -> None:
"""Block until in-flight device work completes; backends outside
``torch.accelerator`` must override with their own wait."""
``torch.accelerator`` must override with their own wait.
"""
if torch.accelerator.is_available():
torch.accelerator.synchronize()
@@ -209,8 +211,7 @@ class WorkerBase:
class WorkerWrapperBase:
"""
This class represents one process in an executor/engine. It is responsible
"""This class represents one process in an executor/engine. It is responsible
for lazily initializing the worker and handling the worker's lifecycle.
We first instantiate the WorkerWrapper, which remembers the worker module
and class name. Then, when we call `update_environment_variables`, and the
@@ -222,8 +223,7 @@ class WorkerWrapperBase:
rpc_rank: int = 0,
global_rank: int | None = None,
) -> None:
"""
Initialize the worker wrapper with the given vllm_config and rpc_rank.
"""Initialize the worker wrapper with the given vllm_config and rpc_rank.
Note: rpc_rank is the rank of the worker in the executor. In most cases,
it is also the rank of the worker in the distributed group. However,
when multiple executors work together, they can be different.
@@ -252,8 +252,7 @@ class WorkerWrapperBase:
@instrument(span_name="Worker init")
def init_worker(self, all_kwargs: list[dict[str, Any]]) -> None:
"""
Here we inject some common logic before initializing the worker.
"""Here we inject some common logic before initializing the worker.
Arguments are passed to the worker class constructor.
"""
kwargs = all_kwargs[self.rpc_rank]