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
+3 -5
View File
@@ -31,8 +31,7 @@ logger = init_logger(__name__)
def get_mem_info_wrapper(
device: int | str | torch.device | None = None,
) -> tuple[int, int]:
"""
Get memory info for a device, compatible with torch.accelerator.get_memory_info API.
"""Get memory info for a device, matching `torch.accelerator.get_memory_info`.
Args:
device: Device specification. Can be:
@@ -43,6 +42,7 @@ def get_mem_info_wrapper(
Returns:
Tuple[int, int]: (free_memory, total_memory) in bytes
"""
# Handle None - use current device
if device is None:
@@ -237,9 +237,7 @@ class XPUPlatform(Platform):
@classmethod
def set_device(cls, device: torch.device) -> None:
"""
Set the device for the current platform.
"""
"""Set the device for the current platform."""
torch.xpu.set_device(device)
@classmethod