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
+4 -2
View File
@@ -72,7 +72,8 @@ _sync_filter_head: tuple | None = None
def _sync_warning_hook(message, category, filename, lineno, file=None, line=None):
"""Turn torch's sync warning into an error, but only on a thread that is
being checked and is outside any allow region."""
being checked and is outside any allow region.
"""
if _TORCH_SYNC_WARNING in str(message):
mode = _checking.get()
if mode is None or _allow_depth.get():
@@ -251,7 +252,8 @@ def _is_dense(t: torch.Tensor) -> bool:
"""Whether `t`'s elements fill a contiguous storage range, possibly
permuted (e.g. a transposed matrix). Such layouts can be copied with
pitched cudaMemcpy2D/3DAsync directly from/to pinned memory, whereas
gapped layouts (e.g. strided slices) stage through a pageable temp."""
gapped layouts (e.g. strided slices) stage through a pageable temp.
"""
if t.is_contiguous():
# The common case, answered by a memoized TensorImpl flag.
return True