Skip to content
Open
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ ignore = [
# Which may negatively affect users, especially if the symbol wasn't meant to be re-exported.
# We do assume no public re-exports were meant from private modules
"!_*.pyi" = ["F401"]
"__init__.pyi" = ["F401"]

[tool.ruff.lint.isort]
combine-as-imports = true
Expand Down
6 changes: 3 additions & 3 deletions stubs/matplotlib/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import contextlib
from collections.abc import Generator
from typing import Literal

import numpy as np
from packaging.version import parse as parse_version
from matplotlib import (
colors as colors, # Example usage: https://matplotlib.org/stable/users/explain/colors/colormapnorms.html#colormap-normalization
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning · Non-blocking recommendation

📍 stubs/matplotlib/init.pyi:5
The prior export-parity concern is only partially addressed: colors is restored, but normal package-level access to matplotlib.cbook and matplotlib.rcsetup remains untyped. Verify those runtime attributes and restore their explicit re-exports when supported, with regression coverage for package-qualified access.

[verified]


from . import _docstring, _version, cbook, colors as colors, rcsetup
from ._typing import *

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning · Non-blocking recommendation

Could you confirm that matplotlib.colors, matplotlib.cbook, and matplotlib.rcsetup are not supported package-level runtime attributes before removing these explicit re-exports? Normal usage such as import matplotlib; matplotlib.colors.Normalize(...) would otherwise lose type support; please restore any runtime-exposed modules and add a regression case.

@Avasam Avasam (Avasam) Sep 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kept colors just because of that one explicit example in docs. https://matplotlib.org/stable/users/explain/colors/colormapnorms.html#colormap-normalization

import matplotlib as mpl
norm = mpl.colors.Normalize(vmin=-1, vmax=1)

But even matplotlib's own pyi (as of 3.8.0+, these stubs are explictly for 3.7.5) shows these were not meant for explicit re-export:
https://github.com/matplotlib/matplotlib/blob/615ff27caeeeb4934bf9164c51c92706a1cc95a0/lib/matplotlib/__init__.pyi#L1-L32


class __getattr__:
Expand Down
1 change: 0 additions & 1 deletion stubs/sklearn/__check_build/__init__.pyi

This file was deleted.

1 change: 0 additions & 1 deletion stubs/sklearn/__check_build/_check_build.pyi

This file was deleted.

45 changes: 17 additions & 28 deletions stubs/sklearn/utils/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,40 +1,29 @@
import math as math
import numbers as numbers
import platform as platform
import struct as struct
import timeit as timeit
import warnings as warnings
from collections.abc import Iterable, Iterator, Sequence
from contextlib import contextmanager as contextmanager, suppress as suppress
from itertools import compress as compress, islice as islice
from typing import Any, SupportsIndex

import numpy as np
from numpy import ndarray
from numpy.random import RandomState
from scipy.sparse import issparse as issparse

from .. import get_config as get_config
from .._typing import ArrayLike, Int, MatrixLike
from ..exceptions import DataConversionWarning as DataConversionWarning
from ..exceptions import DataConversionWarning
from . import metadata_routing
from ._bunch import Bunch as Bunch
from ._estimator_html_repr import estimator_html_repr as estimator_html_repr
from .class_weight import compute_class_weight as compute_class_weight, compute_sample_weight as compute_sample_weight
from .deprecation import deprecated as deprecated
from .discovery import all_estimators as all_estimators
from .murmurhash import murmurhash3_32 as murmurhash3_32
from ._bunch import Bunch
from ._estimator_html_repr import estimator_html_repr
from .class_weight import compute_class_weight, compute_sample_weight
from .deprecation import deprecated
from .discovery import all_estimators
from .murmurhash import murmurhash3_32
from .validation import (
as_float_array as as_float_array,
assert_all_finite as assert_all_finite,
check_array as check_array,
check_consistent_length as check_consistent_length,
check_random_state as check_random_state,
check_scalar as check_scalar,
check_symmetric as check_symmetric,
check_X_y as check_X_y,
column_or_1d as column_or_1d,
indexable as indexable,
as_float_array,
assert_all_finite,
check_array,
check_consistent_length,
check_random_state,
check_scalar,
check_symmetric,
check_X_y,
column_or_1d,
indexable,
)

# Do not deprecate parallel_backend and register_parallel_backend as they are
Expand Down
4 changes: 0 additions & 4 deletions stubs/sympy-stubs/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import sys

import mpmath
from sympy.algebras import Quaternion
from sympy.assumptions import (
AppliedPredicate,
Expand Down Expand Up @@ -128,7 +125,6 @@ from sympy.core import (
vectorize,
zoo,
)
from sympy.core.cache import lazy_function
from sympy.discrete import (
convolution,
covering_product,
Expand Down
1 change: 0 additions & 1 deletion stubs/sympy-stubs/series/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from sympy.core.singleton import S
from sympy.series.approximants import approximants
from sympy.series.formal import fps
from sympy.series.fourier import fourier_series
Expand Down
2 changes: 0 additions & 2 deletions stubs/sympy-stubs/sets/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from sympy.core.singleton import S
from sympy.sets.conditionset import ConditionSet
from sympy.sets.contains import Contains
from sympy.sets.fancysets import ComplexRegion, ImageSet, Range
from sympy.sets.handlers.comparison import _eval_is_eq
from sympy.sets.ordinals import OmegaPower, Ordinal, ord0
from sympy.sets.powerset import PowerSet
from sympy.sets.sets import (
Expand Down
1 change: 0 additions & 1 deletion stubs/sympy-stubs/solvers/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from sympy.core.assumptions import check_assumptions, failing_assumptions
from sympy.core.singleton import S
from sympy.solvers.decompogen import decompogen
from sympy.solvers.deutils import ode_order
from sympy.solvers.diophantine import diophantine
Expand Down
2 changes: 0 additions & 2 deletions stubs/sympy-stubs/utilities/mathml/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from pathlib import Path

from sympy.utilities.decorator import doctest_depends_on

__doctest_requires__ = ...
Expand Down
4 changes: 0 additions & 4 deletions stubs/vispy/glsl/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
# Copyright (c) 2014, Nicolas P. Rougier
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------------------------------
import os as os
import os.path as op

from .. import config as config

def find(name): ...
def get(name): ...
22 changes: 9 additions & 13 deletions stubs/vispy/io/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.

from os import path as _op

from .datasets import (
load_crate as load_crate,
load_data_file as load_data_file,
load_iris as load_iris,
load_spatial_filters as load_spatial_filters,
load_crate,
load_data_file,
load_iris,
load_spatial_filters,
)
from .image import (
_check_img_lib as _check_img_lib,
_make_png as _make_png,
imread as imread,
imsave as imsave,
read_png as read_png,
write_png as write_png,
imread,
imsave,
read_png,
write_png,
)
from .mesh import read_mesh as read_mesh, write_mesh as write_mesh
from .mesh import read_mesh, write_mesh

_data_dir = ...

Expand Down