Skip to content

Commit f795e92

Browse files
RajeshvShiyalpytorchmergebot
authored andcommitted
space added between type and checking for typechecking (pytorch#161352)
space added between type and checking for "typechecking" Fixes pytorch#161282 Pull Request resolved: pytorch#161352 Approved by: https://github.com/malfet
1 parent becd6cd commit f795e92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ def is_tensor(obj: _Any, /) -> _TypeIs["torch.Tensor"]:
11081108
r"""Returns True if `obj` is a PyTorch tensor.
11091109
11101110
Note that this function is simply doing ``isinstance(obj, Tensor)``.
1111-
Using that ``isinstance`` check is better for typechecking with mypy,
1111+
Using that ``isinstance`` check is better for type checking with mypy,
11121112
and more explicit - so it's recommended to use that instead of
11131113
``is_tensor``.
11141114

0 commit comments

Comments
 (0)