Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion stdlib/_operator.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import sys
from _typeshed import SupportsGetItem
from collections.abc import Callable, Container, Iterable, MutableMapping, MutableSequence, Sequence
from typing import Any, AnyStr, Generic, Protocol, SupportsAbs, SupportsIndex, TypeVar, final, overload
from typing_extensions import ParamSpec, TypeAlias, TypeVarTuple, Unpack
from typing_extensions import ParamSpec, TypeAlias, TypeIs, TypeVarTuple, Unpack

_R = TypeVar("_R")
_T = TypeVar("_T")
Expand Down Expand Up @@ -145,3 +145,7 @@ if sys.version_info >= (3, 11):
def call(obj: Callable[_P, _R], /, *args: _P.args, **kwargs: _P.kwargs) -> _R: ...

def _compare_digest(a: AnyStr, b: AnyStr, /) -> bool: ...

if sys.version_info >= (3, 14):
def is_none(a: Any | None, /) -> TypeIs[None]: ...
Comment thread
ZeroIntensity marked this conversation as resolved.
Outdated
def is_not_none(a: _T | None, /) -> TypeIs[_T]: ...
3 changes: 3 additions & 0 deletions stdlib/operator.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ __all__ = [
if sys.version_info >= (3, 11):
__all__ += ["call"]

if sys.version_info >= (3, 14):
__all__ += ["is_none", "is_not_none"]

__lt__ = lt
__le__ = le
__eq__ = eq
Expand Down