Fix torch.randint, torch.mul param missing description (#158731)

Wrong separator cause param description truncated.

- Change separator of param and its description
- Remove quote make `torch.dtype` display as reference to the class

## Test Result

### Before

<img width="1092" height="784" alt="image" src="https://github.com/user-attachments/assets/e8d96b26-07e9-40ff-9392-fa6665d4bbe4" />
<img width="1111" height="457" alt="image" src="https://github.com/user-attachments/assets/a3c2e333-f861-4aeb-b4fb-05c8d880ae81" />

### After

<img width="897" height="820" alt="image" src="https://github.com/user-attachments/assets/d1b5cefa-717a-4223-84b0-4346b7eecf44" />
<img width="872" height="409" alt="image" src="https://github.com/user-attachments/assets/96223c37-cd9d-4656-9e55-032d09cbe5c1" />

Pull Request resolved: https://github.com/pytorch/pytorch/pull/158731
Approved by: https://github.com/ngimel
This commit is contained in:
zeshengzong
2025-07-21 20:17:23 +00:00
committed by PyTorch MergeBot
parent ea5b06ed5b
commit b66f429827

View File

@ -7605,7 +7605,7 @@ Supports :ref:`broadcasting to a common shape <broadcasting-semantics>`,
Args:
{input}
other (Tensor or Number) - the tensor or number to multiply input by.
other (Tensor or Number): the tensor or number to multiply input by.
Keyword args:
{out}
@ -8948,7 +8948,7 @@ Args:
Keyword args:
{generator}
{out}
dtype (`torch.dtype`, optional) - the desired data type of returned tensor. Default: if ``None``,
dtype (torch.dtype, optional): the desired data type of returned tensor. Default: if ``None``,
this function returns a tensor with dtype ``torch.int64``.
{layout}
{device}