mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-07 14:00:12 +08:00
tensorflow: Change Tensor.__bool__ return from NoReturn to bool (#13562)
This commit is contained in:
@@ -6,7 +6,7 @@ from collections.abc import Callable, Generator, Iterable, Iterator, Sequence
|
||||
from contextlib import contextmanager
|
||||
from enum import Enum
|
||||
from types import TracebackType
|
||||
from typing import Any, Generic, Literal, NoReturn, TypeVar, overload
|
||||
from typing import Any, Generic, Literal, TypeVar, overload
|
||||
from typing_extensions import ParamSpec, Self
|
||||
|
||||
from google.protobuf.message import Message
|
||||
@@ -125,7 +125,7 @@ class Tensor:
|
||||
def __gt__(self, other: TensorCompatible, name: str | None = None) -> Tensor: ...
|
||||
def __le__(self, other: TensorCompatible, name: str | None = None) -> Tensor: ...
|
||||
def __lt__(self, other: TensorCompatible, name: str | None = None) -> Tensor: ...
|
||||
def __bool__(self) -> NoReturn: ...
|
||||
def __bool__(self) -> _bool: ...
|
||||
def __getitem__(self, slice_spec: Slice | tuple[Slice, ...]) -> Tensor: ...
|
||||
def __len__(self) -> int: ...
|
||||
# This only works for rank 0 tensors.
|
||||
|
||||
Reference in New Issue
Block a user