Skip to content
Merged
Changes from all 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
26 changes: 26 additions & 0 deletions src/numpy-stubs/testing/print_coercion_tables.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from collections.abc import Iterable
from typing import ClassVar, Generic
from typing_extensions import Self, TypeVar

import numpy as np

_VT_co = TypeVar("_VT_co", default=object, covariant=True)

# undocumented
class GenericObject(Generic[_VT_co]):
dtype: ClassVar[np.dtype[np.object_]] = ...
v: _VT_co

def __init__(self, /, v: _VT_co) -> None: ...
def __add__(self, other: object, /) -> Self: ...
def __radd__(self, other: object, /) -> Self: ...

def print_cancast_table(ntypes: Iterable[str]) -> None: ...
def print_coercion_table(
ntypes: Iterable[str],
inputfirstvalue: int,
inputsecondvalue: int,
firstarray: bool,
use_promote_types: bool = False,
) -> None: ...
def print_new_cast_table(*, can_cast: bool = True, legacy: bool = False, flags: bool = False) -> None: ...