pytorch/torch/_C/_VariableFunctions.pyi.in
Jez Ng 631fb33fd6 Enable import following in MYPYNOFOLLOW (now MYPYINDUCTOR) (#113830)
Skipping importing some packages for now to make this change more
tractable.

For some reason, lintrunner on CI raises errors in all imported `.pyi` files,
even though it doesn't on my local machine. The errors are all from missing
generic types, as the MYPYINDUCTOR config has `disallow_any_generics`
set. I have thus added `disable-error-code` comments to the relevant files,
though I fixed a few that were easy enough.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/113830
Approved by: https://github.com/Skylion007
ghstack dependencies: #113722, #113721
2023-11-17 18:24:21 +00:00

42 lines
627 B
Python

# ${generated_comment}
# mypy: disable-error-code="type-arg"
import builtins
from typing import (
Any,
Callable,
ContextManager,
Iterator,
List,
Literal,
NamedTuple,
Optional,
overload,
Sequence,
Tuple,
TypeVar,
Union,
)
import torch
from torch import contiguous_format, Generator, inf, memory_format, strided, SymInt, Tensor
from torch.types import (
_bool,
_complex,
_device,
_dtype,
_float,
_int,
_layout,
_qscheme,
_size,
Device,
Number,
)
from torch._prims_common import DeviceLikeType
${function_hints}
${all_directive}