mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix multiple docstring type mistakes (#82474)
### Description * Docstrings using `(tuple of ints)` shows up as `(tuple of python:ints)`, so I fixed them by making the `int` no longer plural. Example: https://pytorch.org/docs/stable/generated/torch.permute.html#torch.permute * A docstring type in JIT had one of its types incorrectly highlighted as code. Example: https://pytorch.org/docs/stable/generated/torch.jit.script.html#torch.jit.script * I found some docstring type usages of `string` that had not yet been converted to `str` after #82410 * Some docstrings incorrectly listed their defaults inside the docstring types. * I also found a docstring that was missing its type ### Testing No testing should be required. --- In the developer guidelines, there should probably be standards listed for the docstring types. Pull Request resolved: https://github.com/pytorch/pytorch/pull/82474 Approved by: https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
7be44f8158
commit
8def154e00
@ -367,7 +367,7 @@ def list(github, force_reload=False, skip_validation=False, trust_repo=None):
|
||||
specified by the ``github`` argument properly belongs to the repo owner. This will make
|
||||
requests to the GitHub API; you can specify a non-default GitHub token by setting the
|
||||
``GITHUB_TOKEN`` environment variable. Default is ``False``.
|
||||
trust_repo (bool, string or None): ``"check"``, ``True``, ``False`` or ``None``.
|
||||
trust_repo (bool, str or None): ``"check"``, ``True``, ``False`` or ``None``.
|
||||
This parameter was introduced in v1.12 and helps ensuring that users
|
||||
only run code from repos that they trust.
|
||||
|
||||
@ -423,7 +423,7 @@ def help(github, model, force_reload=False, skip_validation=False, trust_repo=No
|
||||
specified by the ``github`` argument properly belongs to the repo owner. This will make
|
||||
requests to the GitHub API; you can specify a non-default GitHub token by setting the
|
||||
``GITHUB_TOKEN`` environment variable. Default is ``False``.
|
||||
trust_repo (bool, string or None): ``"check"``, ``True``, ``False`` or ``None``.
|
||||
trust_repo (bool, str or None): ``"check"``, ``True``, ``False`` or ``None``.
|
||||
This parameter was introduced in v1.12 and helps ensuring that users
|
||||
only run code from repos that they trust.
|
||||
|
||||
@ -485,7 +485,7 @@ def load(repo_or_dir, model, *args, source='github', trust_repo=None, force_relo
|
||||
*args (optional): the corresponding args for callable ``model``.
|
||||
source (str, optional): 'github' or 'local'. Specifies how
|
||||
``repo_or_dir`` is to be interpreted. Default is 'github'.
|
||||
trust_repo (bool, string or None): ``"check"``, ``True``, ``False`` or ``None``.
|
||||
trust_repo (bool, str or None): ``"check"``, ``True``, ``False`` or ``None``.
|
||||
This parameter was introduced in v1.12 and helps ensuring that users
|
||||
only run code from repos that they trust.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user