Repository: matplotlib/matplotlib
File: lib/matplotlib/cbook.pyi (Python)

Code before:
) -> list[dict[str, Any]]: ...

ls_mapper: dict[str, str]
ls_mapper_r: dict[str, str]

def contiguous_regions(mask: ArrayLike) -> list[np.ndarray]: ...
def is_math_text(s: str) -> bool: ...
def violin_stats(
    X: ArrayLike,
    method: tuple[Literal["GaussianKDE"], Literal["scott", "silverman"] | float | Callable] | Callable = ...,
    points: int = ...,
    quantiles: ArrayLike | None = ...
) -> list[dict[str, Any]]: ...
def pts_to_prestep(x: ArrayLike, *args: ArrayLike) -> np.ndarray: ...
def pts_to_poststep(x: ArrayLike, *args: ArrayLike) -> np.ndarray: ...
def pts_to_midstep(x: np.ndarray, *args: np.ndarray) -> np.ndarray: ...

STEP_LOOKUP_MAP: dict[str, Callable]

def index_of(y: float | ArrayLike) -> tuple[np.ndarray, np.ndarray]: ...
def safe_first_element(obj: Collection[_T]) -> _T: ...
def sanitize_sequence(data): ...
def _resize_sequence(seq: Sequence, N: int) -> Sequence: ...
def normalize_kwargs(
    kw: dict[str, Any],
    alias_mapping: type[Artist] | Artist = ...,
) -> dict[str, Any]: ...
def _lock_path(path: str | os.PathLike) -> contextlib.AbstractContextManager[None]: ...
def _str_equal(obj: Any, s: str) -> bool: ...
def _str_lower_equal(obj: Any, s: str) -> bool: ...
def _array_perimeter(arr: np.ndarray) -> np.ndarray: ...
def _unfold(arr: np.ndarray, axis: int, size: int, step: int) -> np.ndarray: ...
def _array_patch_perimeters(x: np.ndarray, rstride: int, cstride: int) -> np.ndarray: ...
def _setattr_cm(obj: Any, **kwargs) -> contextlib.AbstractContextManager[None]: ...

class _OrderedSet(collections.abc.MutableSet):
    def __init__(self) -> None: ...
    def __contains__(self, key) -> bool: ...
    def __iter__(self): ...
    def __len__(self) -> int: ...
    def add(self, key) -> None: ...
    def discard(self, key) -> None: ...

def _setup_new_guiapp() -> None: ...
def _format_approx(number: float, precision: int) -> str: ...
def _g_sig_digits(value: float, delta: float) -> int: ...
def _unikey_or_keysym_to_mplkey(unikey: str, keysym: str) -> str: ...
def _is_torch_array(x: Any) -> bool: ...
def _is_jax_array(x: Any) -> bool: ...
def _unpack_to_numpy(x: Any) -> Any: ...
def _auto_format_str(fmt: str, value: Any) -> str: ...

Review comment (bug):
```suggestion
    alias_mapping: type[Artist] | Artist | None = ...,
```
I haven't checked but I _think_ this will clear up the stubtest failure.  We do not have guidance for removal of a default in the guide, but I think the closest is

> Items decorated with `@_api.delete_parameter` should include a default value hint for the deleted parameter
https://matplotlib.org/devdocs/devel/api_changes.html#introduce-deprecation

Code after:
) -> list[dict[str, Any]]: ...

ls_mapper: dict[str, str]
ls_mapper_r: dict[str, str]

def contiguous_regions(mask: ArrayLike) -> list[np.ndarray]: ...
def is_math_text(s: str) -> bool: ...
def violin_stats(
    X: ArrayLike,
    method: tuple[Literal["GaussianKDE"], Literal["scott", "silverman"] | float | Callable] | Callable = ...,
    points: int = ...,
    quantiles: ArrayLike | None = ...
) -> list[dict[str, Any]]: ...
def pts_to_prestep(x: ArrayLike, *args: ArrayLike) -> np.ndarray: ...
def pts_to_poststep(x: ArrayLike, *args: ArrayLike) -> np.ndarray: ...
def pts_to_midstep(x: np.ndarray, *args: np.ndarray) -> np.ndarray: ...

STEP_LOOKUP_MAP: dict[str, Callable]

def index_of(y: float | ArrayLike) -> tuple[np.ndarray, np.ndarray]: ...
def safe_first_element(obj: Collection[_T]) -> _T: ...
def sanitize_sequence(data): ...
def _resize_sequence(seq: Sequence, N: int) -> Sequence: ...
def normalize_kwargs(
    kw: dict[str, Any],
    alias_mapping: type[Artist] | Artist | None = ...,
) -> dict[str, Any]: ...
def _lock_path(path: str | os.PathLike) -> contextlib.AbstractContextManager[None]: ...
def _str_equal(obj: Any, s: str) -> bool: ...
def _str_lower_equal(obj: Any, s: str) -> bool: ...
def _array_perimeter(arr: np.ndarray) -> np.ndarray: ...
def _unfold(arr: np.ndarray, axis: int, size: int, step: int) -> np.ndarray: ...
def _array_patch_perimeters(x: np.ndarray, rstride: int, cstride: int) -> np.ndarray: ...
def _setattr_cm(obj: Any, **kwargs) -> contextlib.AbstractContextManager[None]: ...

class _OrderedSet(collections.abc.MutableSet):
    def __init__(self) -> None: ...
    def __contains__(self, key) -> bool: ...
    def __iter__(self): ...
    def __len__(self) -> int: ...
    def add(self, key) -> None: ...
    def discard(self, key) -> None: ...

def _setup_new_guiapp() -> None: ...
def _format_approx(number: float, precision: int) -> str: ...
def _g_sig_digits(value: float, delta: float) -> int: ...
def _unikey_or_keysym_to_mplkey(unikey: str, keysym: str) -> str: ...
def _is_torch_array(x: Any) -> bool: ...
def _is_jax_array(x: Any) -> bool: ...
def _unpack_to_numpy(x: Any) -> Any: ...
def _auto_format_str(fmt: str, value: Any) -> str: ...