remove allow-untyped-defs from torch/_size_docs.py (#143942)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/143942
Approved by: https://github.com/Skylion007
This commit is contained in:
bobrenjc93
2024-12-28 13:37:44 -08:00
committed by PyTorch MergeBot
parent 85f348578b
commit 3ba6fcd3ff

View File

@ -1,11 +1,10 @@
# mypy: allow-untyped-defs
"""Adds docstrings to torch.Size functions"""
import torch._C
from torch._C import _add_docstr as add_docstr
def add_docstr_all(method, docstr):
def add_docstr_all(method: str, docstr: str) -> None:
add_docstr(getattr(torch._C.Size, method), docstr)