From e45e60a3f4a4c8005d0d71ef80498fa1557f89d8 Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 6 Nov 2024 20:57:01 -0500 Subject: [PATCH] Fix all reportMissingImports --- pyproject.toml | 1 - stubs/matplotlib/axis.pyi | 5 +-- stubs/matplotlib/backends/backend_gtk3.pyi | 3 +- stubs/skimage/__init__.pyi | 3 +- stubs/skimage/_shared/filters.pyi | 6 +-- stubs/skimage/feature/_basic_features.pyi | 3 +- stubs/skimage/feature/_cascade.pyi | 17 +++++++ stubs/skimage/future/graph/_ncut.pyi | 3 +- stubs/skimage/future/graph/graph_cut.pyi | 2 +- stubs/skimage/future/graph/graph_merge.pyi | 3 +- stubs/skimage/future/graph/rag.pyi | 2 +- .../skimage/future/trainable_segmentation.pyi | 3 +- stubs/skimage/measure/_find_contours.pyi | 3 +- stubs/skimage/measure/_regionprops.pyi | 2 +- stubs/skimage/transform/integral.pyi | 3 +- stubs/sklearn/_build_utils/__init__.pyi | 2 - stubs/sklearn/utils/estimator_checks.pyi | 5 +-- stubs/sympy-stubs/core/__init__.pyi | 44 +++++++++---------- stubs/sympy-stubs/vector/parametricregion.pyi | 6 +-- stubs/sympy-stubs/vector/scalar.pyi | 2 +- stubs/sympy-stubs/vector/vector.pyi | 12 ++--- stubs/vispy/app/application.pyi | 2 - stubs/vispy/app/canvas.pyi | 7 ++- stubs/vispy/app/timer.pyi | 26 +++++++++++ stubs/vispy/color/colormap.pyi | 1 - stubs/vispy/geometry/rect.pyi | 1 - stubs/vispy/io/stl.pyi | 3 +- stubs/vispy/plot/fig.pyi | 3 +- stubs/vispy/scene/cameras/base_camera.pyi | 3 +- stubs/vispy/scene/cameras/fly.pyi | 2 +- stubs/vispy/scene/cameras/magnify.pyi | 2 +- stubs/vispy/scene/cameras/panzoom.pyi | 3 +- stubs/vispy/scene/cameras/perspective.pyi | 4 +- stubs/vispy/scene/widgets/axis.pyi | 4 +- stubs/vispy/scene/widgets/colorbar.pyi | 4 +- stubs/vispy/scene/widgets/console.pyi | 4 +- stubs/vispy/scene/widgets/grid.pyi | 2 - stubs/vispy/scene/widgets/label.pyi | 3 +- stubs/vispy/scene/widgets/viewbox.pyi | 4 +- stubs/vispy/util/check_environment.pyi | 2 - stubs/vispy/visuals/_scalable_textures.pyi | 4 +- stubs/vispy/visuals/axis.pyi | 2 +- stubs/vispy/visuals/border.pyi | 1 - stubs/vispy/visuals/box.pyi | 2 +- .../collections/agg_path_collection.pyi | 2 +- .../collections/agg_point_collection.pyi | 2 +- .../vispy/visuals/collections/array_list.pyi | 1 - .../visuals/collections/base_collection.pyi | 2 +- .../collections/raw_path_collection.pyi | 2 +- .../collections/raw_point_collection.pyi | 2 +- stubs/vispy/visuals/cube.pyi | 2 +- stubs/vispy/visuals/ellipse.pyi | 2 +- stubs/vispy/visuals/filters/mesh.pyi | 6 +-- stubs/vispy/visuals/gridlines.pyi | 3 +- stubs/vispy/visuals/histogram.pyi | 2 +- stubs/vispy/visuals/isocurve.pyi | 2 +- stubs/vispy/visuals/isoline.pyi | 4 +- stubs/vispy/visuals/isosurface.pyi | 2 +- stubs/vispy/visuals/line/arrow.pyi | 3 +- stubs/vispy/visuals/line/line.pyi | 1 - stubs/vispy/visuals/line_plot.pyi | 2 +- stubs/vispy/visuals/markers.pyi | 2 +- stubs/vispy/visuals/mesh.pyi | 4 +- stubs/vispy/visuals/plane.pyi | 2 +- stubs/vispy/visuals/rectangle.pyi | 2 +- stubs/vispy/visuals/sphere.pyi | 2 +- stubs/vispy/visuals/text/_sdf_gpu.pyi | 1 - stubs/vispy/visuals/text/text.pyi | 2 +- stubs/vispy/visuals/transforms/chain.pyi | 2 +- .../vispy/visuals/transforms/interactive.pyi | 4 +- stubs/vispy/visuals/transforms/linear.pyi | 1 - .../visuals/transforms/transform_system.pyi | 2 +- stubs/vispy/visuals/tube.pyi | 4 +- stubs/vispy/visuals/visual.pyi | 2 +- stubs/vispy/visuals/windbarb.pyi | 10 ++--- tests/requirements.txt | 3 +- 76 files changed, 161 insertions(+), 141 deletions(-) create mode 100644 stubs/skimage/feature/_cascade.pyi create mode 100644 stubs/vispy/app/timer.pyi diff --git a/pyproject.toml b/pyproject.toml index 72b4fe83..e224c6af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,7 +91,6 @@ reportFunctionMemberAccess = "none" # TODO reportGeneralTypeIssues = "none" # TODO reportInvalidTypeArguments = "none" # TODO reportInvalidTypeForm = "none" # TODO -reportMissingImports = "none" # TODO reportUndefinedVariable = "none" # TODO reportUnusedVariable = "none" # TODO diff --git a/stubs/matplotlib/axis.pyi b/stubs/matplotlib/axis.pyi index abf54235..5202a0f7 100644 --- a/stubs/matplotlib/axis.pyi +++ b/stubs/matplotlib/axis.pyi @@ -3,7 +3,6 @@ from datetime import timezone from typing import Any, Callable, Literal, Type import numpy as np -from units.basic_units import BasicUnit from .artist import Artist, allow_rasterization from .axes import Axes @@ -185,8 +184,8 @@ class Axis(Artist): def update_units(self, data: Any) -> bool: ... def have_units(self) -> bool: ... def convert_units(self, x): ... - def set_units(self, u: None | timezone | float | BasicUnit) -> None: ... - def get_units(self) -> None | timezone | float | BasicUnit: ... + def set_units(self, u) -> None: ... + def get_units(self): ... def set_label_text(self, label: str, fontdict: dict = ..., **kwargs): ... def set_major_formatter(self, formatter: Formatter | str | Callable) -> None: ... def set_minor_formatter(self, formatter: Formatter | str | Callable) -> None: ... diff --git a/stubs/matplotlib/backends/backend_gtk3.pyi b/stubs/matplotlib/backends/backend_gtk3.pyi index 18ae3b2f..625ca79e 100644 --- a/stubs/matplotlib/backends/backend_gtk3.pyi +++ b/stubs/matplotlib/backends/backend_gtk3.pyi @@ -1,6 +1,7 @@ from typing import Callable, Type -from gi.repository import Gtk +# PyGObject is not easily installable on Windows, let tests pass as-is +from gi.repository import Gtk # pyright: ignore[reportMissingImports] from matplotlib import backend_tools from matplotlib._api import classproperty from matplotlib.backend_bases import FigureCanvasBase, ToolContainerBase diff --git a/stubs/skimage/__init__.pyi b/stubs/skimage/__init__.pyi index fcb55338..4d15b2e1 100644 --- a/stubs/skimage/__init__.pyi +++ b/stubs/skimage/__init__.pyi @@ -3,6 +3,7 @@ __version__: str = ... submodules: list = ... from ._shared import lazy as lazy +from ._shared.tester import PytestTester as PytestTester # noqa from ._shared.version_requirements import ensure_python_version as ensure_python_version __getattr__, __lazy_dir__, _ = ... @@ -18,6 +19,4 @@ _STANDARD_MSG: str = ... def _raise_build_error(e): ... -from skimage._shared.tester import PytestTester as PytestTester # noqa - test = ... diff --git a/stubs/skimage/_shared/filters.pyi b/stubs/skimage/_shared/filters.pyi index 7fea13d8..86044ed1 100644 --- a/stubs/skimage/_shared/filters.pyi +++ b/stubs/skimage/_shared/filters.pyi @@ -4,10 +4,10 @@ from typing import Literal import numpy as np from numpy.typing import ArrayLike, NDArray from scipy import ndimage as ndi -from skimage._typing import Scalar -from .._shared import utils -from .._shared.utils import _supported_float_type, convert_to_float, warn +from .._typing import Scalar +from . import utils +from .utils import _supported_float_type, convert_to_float, warn @utils.deprecate_multichannel_kwarg(multichannel_position=5) def gaussian( diff --git a/stubs/skimage/feature/_basic_features.pyi b/stubs/skimage/feature/_basic_features.pyi index 12661d89..32fc5d7b 100644 --- a/stubs/skimage/feature/_basic_features.pyi +++ b/stubs/skimage/feature/_basic_features.pyi @@ -4,7 +4,8 @@ from itertools import combinations_with_replacement import numpy as np from numpy.typing import NDArray -from skimage._shared import utils + +from .._shared import utils def _texture_filter(gaussian_filtered): ... def _singlescale_basic_features_singlechannel(img, sigma, intensity=True, edges=True, texture=True): ... diff --git a/stubs/skimage/feature/_cascade.pyi b/stubs/skimage/feature/_cascade.pyi new file mode 100644 index 00000000..0041bfa1 --- /dev/null +++ b/stubs/skimage/feature/_cascade.pyi @@ -0,0 +1,17 @@ +from typing import Any, ClassVar + +__reduce_cython__: Any +__setstate_cython__: Any +__test__: dict + +class Cascade: + __pyx_vtable__: ClassVar[Any] = ... + eps: Any + features_number: Any + stages_number: Any + stumps_number: Any + window_height: Any + window_width: Any + def __init__(self, *args, **kwargs) -> None: ... + def detect_multi_scale(self, *args, **kwargs): ... + def __reduce__(self): ... diff --git a/stubs/skimage/future/graph/_ncut.pyi b/stubs/skimage/future/graph/_ncut.pyi index fca01b75..16df95fc 100644 --- a/stubs/skimage/future/graph/_ncut.pyi +++ b/stubs/skimage/future/graph/_ncut.pyi @@ -2,7 +2,8 @@ import networkx as nx import numpy as np from numpy.typing import NDArray from scipy import sparse -from skimage.future.graph.rag import RAG + +from .rag import RAG def DW_matrices(graph: RAG): ... def ncut_cost(cut: NDArray, D, W) -> float: ... diff --git a/stubs/skimage/future/graph/graph_cut.pyi b/stubs/skimage/future/graph/graph_cut.pyi index 6671f1a3..5b10a39b 100644 --- a/stubs/skimage/future/graph/graph_cut.pyi +++ b/stubs/skimage/future/graph/graph_cut.pyi @@ -2,9 +2,9 @@ import networkx as nx import numpy as np from numpy.typing import ArrayLike, NDArray from scipy.sparse import linalg -from skimage.future.graph.rag import RAG from . import _ncut +from .rag import RAG def cut_threshold(labels: NDArray, rag: RAG, thresh: float, in_place: bool = True) -> NDArray: ... def cut_normalized( diff --git a/stubs/skimage/future/graph/graph_merge.pyi b/stubs/skimage/future/graph/graph_merge.pyi index 1d05d06a..edd789d7 100644 --- a/stubs/skimage/future/graph/graph_merge.pyi +++ b/stubs/skimage/future/graph/graph_merge.pyi @@ -3,7 +3,8 @@ from typing import Callable import numpy as np from numpy.typing import NDArray -from skimage.future.graph.rag import RAG + +from .rag import RAG def _revalidate_node_edges(rag, node, heap_list): ... def _rename_node(graph, node_id, copy_id): ... diff --git a/stubs/skimage/future/graph/rag.pyi b/stubs/skimage/future/graph/rag.pyi index 5b70f120..f5f0dfa9 100644 --- a/stubs/skimage/future/graph/rag.pyi +++ b/stubs/skimage/future/graph/rag.pyi @@ -5,9 +5,9 @@ import networkx as nx import numpy as np from numpy.lib.stride_tricks import as_strided from scipy import ndimage as ndi, sparse -from skimage.future.graph.rag import RAG from ..._shared.version_requirements import require +from .rag import RAG def _edge_generator_from_csr(csr_matrix): ... def min_weight(graph: RAG, src: int, dst: int, n: int) -> Mapping: ... diff --git a/stubs/skimage/future/trainable_segmentation.pyi b/stubs/skimage/future/trainable_segmentation.pyi index 606c7231..77ef1137 100644 --- a/stubs/skimage/future/trainable_segmentation.pyi +++ b/stubs/skimage/future/trainable_segmentation.pyi @@ -1,5 +1,6 @@ from numpy.typing import NDArray -from skimage.feature import multiscale_basic_features + +from ..feature import multiscale_basic_features class TrainableSegmenter(object): def __init__(self, clf=None, features_func=None): ... diff --git a/stubs/skimage/measure/_find_contours.pyi b/stubs/skimage/measure/_find_contours.pyi index 743071f1..bafc67d0 100644 --- a/stubs/skimage/measure/_find_contours.pyi +++ b/stubs/skimage/measure/_find_contours.pyi @@ -1,7 +1,8 @@ from collections import deque import numpy as np -from skimage._shared.utils import deprecate_kwarg + +from .._shared.utils import deprecate_kwarg _param_options = ... diff --git a/stubs/skimage/measure/_regionprops.pyi b/stubs/skimage/measure/_regionprops.pyi index d1714b7a..7a0b2397 100644 --- a/stubs/skimage/measure/_regionprops.pyi +++ b/stubs/skimage/measure/_regionprops.pyi @@ -8,11 +8,11 @@ import numpy as np from numpy.typing import ArrayLike from scipy import ndimage as ndi from scipy.spatial.distance import pdist -from skimage.measure._regionprops import RegionProperties from . import _moments from ._find_contours import find_contours from ._marching_cubes_lewiner import marching_cubes +from ._regionprops import RegionProperties from ._regionprops_utils import euler_number, perimeter, perimeter_crofton __all__ = ["regionprops", "euler_number", "perimeter", "perimeter_crofton"] diff --git a/stubs/skimage/transform/integral.pyi b/stubs/skimage/transform/integral.pyi index 2d45cb67..4d275054 100644 --- a/stubs/skimage/transform/integral.pyi +++ b/stubs/skimage/transform/integral.pyi @@ -1,7 +1,8 @@ import numpy as np from numpy import ndarray from numpy.typing import NDArray -from skimage._typing import Scalar + +from .._typing import Scalar def integral_image(image: NDArray, *, dtype=None) -> NDArray: ... def integrate(ii: NDArray, start, end) -> Scalar | np.ndarray: ... diff --git a/stubs/sklearn/_build_utils/__init__.pyi b/stubs/sklearn/_build_utils/__init__.pyi index 6cf3128d..140d7941 100644 --- a/stubs/sklearn/_build_utils/__init__.pyi +++ b/stubs/sklearn/_build_utils/__init__.pyi @@ -2,8 +2,6 @@ import contextlib as contextlib import os as os import sklearn as sklearn -from Cython import Tempita as Tempita -from Cython.Build import cythonize as cythonize from .._min_dependencies import CYTHON_MIN_VERSION as CYTHON_MIN_VERSION from ..externals._packaging.version import parse as parse diff --git a/stubs/sklearn/utils/estimator_checks.pyi b/stubs/sklearn/utils/estimator_checks.pyi index e2d6236d..87c35521 100644 --- a/stubs/sklearn/utils/estimator_checks.pyi +++ b/stubs/sklearn/utils/estimator_checks.pyi @@ -11,8 +11,7 @@ from typing import Sequence import joblib import numpy as np -from _pytest.mark.structures import MarkDecorator -from pytest.mark import parameterize +from _pytest.mark.structures import _ParametrizeMarkDecorator from scipy import sparse as sparse from scipy.stats import rankdata as rankdata @@ -82,7 +81,7 @@ CROSS_DECOMPOSITION: list = ... def check_supervised_y_no_nan(name, estimator_orig): ... def parametrize_with_checks( estimators: Sequence[BaseEstimator], -) -> MarkDecorator | parameterize: ... +) -> _ParametrizeMarkDecorator: ... def check_estimator( estimator: None | BaseEstimator = None, generate_only: bool = False, diff --git a/stubs/sympy-stubs/core/__init__.pyi b/stubs/sympy-stubs/core/__init__.pyi index d8eef779..f0eb35d5 100644 --- a/stubs/sympy-stubs/core/__init__.pyi +++ b/stubs/sympy-stubs/core/__init__.pyi @@ -1,12 +1,12 @@ -from sympy.core.add import Add -from sympy.core.assumptions import assumptions, check_assumptions, common_assumptions, failing_assumptions -from sympy.core.basic import Atom, Basic -from sympy.core.cache import cacheit -from sympy.core.containers import Dict, Tuple -from sympy.core.evalf import N, PrecisionExhausted, evalf -from sympy.core.expr import AtomicExpr, Expr, UnevaluatedExpr -from sympy.core.exprtools import factor_nc, factor_terms, gcd_terms -from sympy.core.function import ( +from .add import Add +from .assumptions import assumptions, check_assumptions, common_assumptions, failing_assumptions +from .basic import Atom, Basic +from .cache import cacheit +from .containers import Dict, Tuple +from .evalf import N, PrecisionExhausted, evalf +from .expr import AtomicExpr, Expr, UnevaluatedExpr +from .exprtools import factor_nc, factor_terms, gcd_terms +from .function import ( Derivative, Function, FunctionClass, @@ -28,11 +28,11 @@ from sympy.core.function import ( expand_trig, nfloat, ) -from sympy.core.kind import BooleanKind, NumberKind, UndefinedKind -from sympy.core.mod import Mod -from sympy.core.mul import Mul, prod -from sympy.core.multidimensional import vectorize -from sympy.core.numbers import ( +from .kind import BooleanKind, NumberKind, UndefinedKind +from .mod import Mod +from .mul import Mul, prod +from .multidimensional import vectorize +from .numbers import ( AlgebraicNumber, E, Float, @@ -52,9 +52,9 @@ from sympy.core.numbers import ( seterr, zoo, ) -from sympy.core.parameters import evaluate -from sympy.core.power import Pow, integer_log, integer_nthroot -from sympy.core.relational import ( +from .parameters import evaluate +from .power import Pow, integer_log, integer_nthroot +from .relational import ( Eq, Equality, Ge, @@ -69,11 +69,11 @@ from sympy.core.relational import ( StrictLessThan, Unequality, ) -from sympy.core.singleton import S -from sympy.core.sorting import default_sort_key, ordered -from sympy.core.symbol import Dummy, Symbol, Wild, symbols, var -from sympy.core.sympify import SympifyError, sympify -from sympy.core.traversal import bottom_up, postorder_traversal, preorder_traversal, use +from .singleton import S +from .sorting import default_sort_key, ordered +from .symbol import Dummy, Symbol, Wild, symbols, var +from .sympify import SympifyError, sympify +from .traversal import bottom_up, postorder_traversal, preorder_traversal, use Catalan = ... EulerGamma = ... diff --git a/stubs/sympy-stubs/vector/parametricregion.pyi b/stubs/sympy-stubs/vector/parametricregion.pyi index ecacb8b5..33322b06 100644 --- a/stubs/sympy-stubs/vector/parametricregion.pyi +++ b/stubs/sympy-stubs/vector/parametricregion.pyi @@ -2,9 +2,9 @@ from functools import singledispatch from typing import Any from typing_extensions import Self -from sympy.core import Basic -from sympy.geometry import Curve, Ellipse, Point, Polygon, Segment -from sympy.vector import ImplicitRegion +from ..core import Basic +from ..geometry import Curve, Ellipse, Point, Polygon, Segment +from . import ImplicitRegion class ParametricRegion(Basic): def __new__(cls, definition, *bounds) -> Self: ... diff --git a/stubs/sympy-stubs/vector/scalar.pyi b/stubs/sympy-stubs/vector/scalar.pyi index f69f65c4..c7bec3f5 100644 --- a/stubs/sympy-stubs/vector/scalar.pyi +++ b/stubs/sympy-stubs/vector/scalar.pyi @@ -1,6 +1,6 @@ from typing_extensions import Self -from sympy.core import AtomicExpr +from ..core import AtomicExpr class BaseScalar(AtomicExpr): def __new__(cls, index, system, pretty_str=..., latex_str=...) -> Self: ... diff --git a/stubs/sympy-stubs/vector/vector.pyi b/stubs/sympy-stubs/vector/vector.pyi index b061f741..530d9b16 100644 --- a/stubs/sympy-stubs/vector/vector.pyi +++ b/stubs/sympy-stubs/vector/vector.pyi @@ -1,12 +1,12 @@ from typing import Any, Callable, Literal from typing_extensions import Self -from sympy import ImmutableDenseMatrix, Pow -from sympy.core.add import Add -from sympy.core.expr import AtomicExpr, Expr -from sympy.series.order import Order -from sympy.vector.basisdependent import BasisDependent, BasisDependentAdd, BasisDependentMul, BasisDependentZero -from sympy.vector.dyadic import DyadicZero +from ..core.add import Add +from ..core.expr import AtomicExpr, Expr +from ..series.order import Order +from . import ImmutableDenseMatrix, Pow +from .basisdependent import BasisDependent, BasisDependentAdd, BasisDependentMul, BasisDependentZero +from .dyadic import DyadicZero class Vector(BasisDependent): is_scalar = ... diff --git a/stubs/vispy/app/application.pyi b/stubs/vispy/app/application.pyi index 5a8a2642..0bedb6fc 100644 --- a/stubs/vispy/app/application.pyi +++ b/stubs/vispy/app/application.pyi @@ -11,8 +11,6 @@ import sys from .. import config from ..util import logger from . import backends -from ._detect_eventloop import _get_running_interactive_framework -from .backends import BACKEND_NAMES, BACKENDMAP, CORE_BACKENDS, TRIED_BACKENDS from .base import BaseApplicationBackend as ApplicationBackend # noqa class Application(object): diff --git a/stubs/vispy/app/canvas.pyi b/stubs/vispy/app/canvas.pyi index 17ab77a5..a6eb7980 100644 --- a/stubs/vispy/app/canvas.pyi +++ b/stubs/vispy/app/canvas.pyi @@ -10,18 +10,17 @@ from typing import Callable, Mapping import numpy as np from numpy.typing import ArrayLike -from vispy.app.application import Application -from vispy.gloo.context import GLContext -from vispy.scene.widgets.widget import Widget -from vispy.util.keys import Key from ..gloo import FrameBuffer, RenderBuffer from ..gloo.context import GLContext, forget_canvas, set_current_canvas +from ..scene.widgets.widget import Widget from ..util import config as util_config, logger from ..util.dpi import get_dpi from ..util.event import EmitterGroup, Event, WarningEmitter +from ..util.keys import Key from ..util.ptime import time from . import Application, use_app +from .application import Application # todo: add functions for asking about current mouse/keyboard state # todo: add hover enter/exit events diff --git a/stubs/vispy/app/timer.pyi b/stubs/vispy/app/timer.pyi new file mode 100644 index 00000000..5879164c --- /dev/null +++ b/stubs/vispy/app/timer.pyi @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Copyright (c) Vispy Development Team. All Rights Reserved. +# Distributed under the (new) BSD License. See LICENSE.txt for more info. +from typing import Any + +from . import Application +from .base import BaseTimerBackend as TimerBackend # noqa + +class Timer: + def __init__(self, interval=..., connect=..., iterations=..., start=..., app=...) -> None: ... + @property + def app(self) -> Application: ... + @property + def interval(self) -> float: ... + @interval.setter + def interval(self, val) -> None: ... + @property + def elapsed(self) -> float: ... + @property + def running(self) -> bool: ... + def start(self, interval=..., iterations=...) -> None: ... + def stop(self) -> None: ... + @property + def native(self) -> Any: ... + def connect(self, callback): ... + def disconnect(self, callback=...): ... diff --git a/stubs/vispy/color/colormap.pyi b/stubs/vispy/color/colormap.pyi index 36aa8b8b..bb23205d 100644 --- a/stubs/vispy/color/colormap.pyi +++ b/stubs/vispy/color/colormap.pyi @@ -2,7 +2,6 @@ import warnings from typing import Sequence import numpy as np -import vispy.gloo from numpy.typing import ArrayLike, NDArray from .._typing import Scalar diff --git a/stubs/vispy/geometry/rect.pyi b/stubs/vispy/geometry/rect.pyi index 48740b91..21751d9d 100644 --- a/stubs/vispy/geometry/rect.pyi +++ b/stubs/vispy/geometry/rect.pyi @@ -1,5 +1,4 @@ import numpy as np -from vispy.util.svg.shapes import Rect class Rect(object): def __init__(self, *args, **kwargs): ... diff --git a/stubs/vispy/io/stl.pyi b/stubs/vispy/io/stl.pyi index a8e40b66..52bbf015 100644 --- a/stubs/vispy/io/stl.pyi +++ b/stubs/vispy/io/stl.pyi @@ -1,7 +1,8 @@ from typing import IO import numpy as np -from vispy._typing import FileLike + +from .._typing import FileLike # -*- coding: utf-8 -*- # Copyright (c) 2015 Michael Dawson-Haggerty diff --git a/stubs/vispy/plot/fig.pyi b/stubs/vispy/plot/fig.pyi index 287a5b15..7a3923eb 100644 --- a/stubs/vispy/plot/fig.pyi +++ b/stubs/vispy/plot/fig.pyi @@ -1,6 +1,5 @@ -from vispy.util.svg.color import Color - from ..scene import SceneCanvas +from ..util.svg.color import Color from .plotwidget import PlotWidget # -*- coding: utf-8 -*- diff --git a/stubs/vispy/scene/cameras/base_camera.pyi b/stubs/vispy/scene/cameras/base_camera.pyi index c9fce0a7..d6d4e419 100644 --- a/stubs/vispy/scene/cameras/base_camera.pyi +++ b/stubs/vispy/scene/cameras/base_camera.pyi @@ -1,10 +1,9 @@ from typing import Literal, Mapping from numpy.typing import ArrayLike -from vispy.scene.node import Node -from vispy.util.event import Event from ...util import keys +from ...util.event import Event from ...visuals.transforms import MatrixTransform, NullTransform, STTransform, TransformCache from ..node import Node diff --git a/stubs/vispy/scene/cameras/fly.pyi b/stubs/vispy/scene/cameras/fly.pyi index 37e19ab0..f1adc09a 100644 --- a/stubs/vispy/scene/cameras/fly.pyi +++ b/stubs/vispy/scene/cameras/fly.pyi @@ -1,9 +1,9 @@ import math import numpy as np -from vispy.util.event import Event from ...util import keys +from ...util.event import Event from ...util.quaternion import Quaternion from .perspective import PerspectiveCamera diff --git a/stubs/vispy/scene/cameras/magnify.pyi b/stubs/vispy/scene/cameras/magnify.pyi index 08d2f86e..9004f50d 100644 --- a/stubs/vispy/scene/cameras/magnify.pyi +++ b/stubs/vispy/scene/cameras/magnify.pyi @@ -1,6 +1,6 @@ import numpy as np -from vispy.util.event import Event +from ...util.event import Event from ...visuals.transforms.nonlinear import Magnify1DTransform, MagnifyTransform from .panzoom import PanZoomCamera diff --git a/stubs/vispy/scene/cameras/panzoom.pyi b/stubs/vispy/scene/cameras/panzoom.pyi index 7d575111..78b3ec53 100644 --- a/stubs/vispy/scene/cameras/panzoom.pyi +++ b/stubs/vispy/scene/cameras/panzoom.pyi @@ -1,8 +1,7 @@ import numpy as np -from vispy.util.event import Event -from vispy.util.svg.shapes import Rect from ...geometry import Rect +from ...util.event import Event from ...visuals.transforms import MatrixTransform, STTransform from .base_camera import BaseCamera diff --git a/stubs/vispy/scene/cameras/perspective.pyi b/stubs/vispy/scene/cameras/perspective.pyi index 2d871846..6f703682 100644 --- a/stubs/vispy/scene/cameras/perspective.pyi +++ b/stubs/vispy/scene/cameras/perspective.pyi @@ -1,10 +1,10 @@ import math import numpy as np -from vispy._typing import Scalar -from vispy.util.event import Event +from ..._typing import Scalar from ...util import keys, transforms +from ...util.event import Event from ...visuals.transforms import MatrixTransform from .base_camera import BaseCamera diff --git a/stubs/vispy/scene/widgets/axis.pyi b/stubs/vispy/scene/widgets/axis.pyi index e56fda6e..0f25507d 100644 --- a/stubs/vispy/scene/widgets/axis.pyi +++ b/stubs/vispy/scene/widgets/axis.pyi @@ -4,10 +4,10 @@ # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- import numpy as np -from vispy.scene.widgets.viewbox import ViewBox -from vispy.util.event import Event +from ...util.event import Event from ...visuals import AxisVisual +from .viewbox import ViewBox from .widget import Widget class AxisWidget(Widget): diff --git a/stubs/vispy/scene/widgets/colorbar.pyi b/stubs/vispy/scene/widgets/colorbar.pyi index 6d54acbc..579b3047 100644 --- a/stubs/vispy/scene/widgets/colorbar.pyi +++ b/stubs/vispy/scene/widgets/colorbar.pyi @@ -1,9 +1,9 @@ from typing import Literal import numpy as np -from vispy.color import Color, Colormap -from vispy.util.event import Event +from ...color import Color, Colormap +from ...util.event import Event from ...visuals import ColorBarVisual from .widget import Widget diff --git a/stubs/vispy/scene/widgets/console.pyi b/stubs/vispy/scene/widgets/console.pyi index 60c18bde..da28f8dc 100644 --- a/stubs/vispy/scene/widgets/console.pyi +++ b/stubs/vispy/scene/widgets/console.pyi @@ -1,9 +1,9 @@ import numpy as np -from vispy.util.event import Event -from vispy.util.svg.color import Color from ...color import Color from ...gloo import VertexBuffer +from ...util.event import Event +from ...util.svg.color import Color from ...visuals import Visual from .widget import Widget diff --git a/stubs/vispy/scene/widgets/grid.pyi b/stubs/vispy/scene/widgets/grid.pyi index 8d7e05a1..e94bedc8 100644 --- a/stubs/vispy/scene/widgets/grid.pyi +++ b/stubs/vispy/scene/widgets/grid.pyi @@ -1,7 +1,5 @@ import numpy as np from kiwisolver import Solver, UnsatisfiableConstraint, Variable -from vispy.geometry import Rect -from vispy.scene.widgets.widget import Widget from .viewbox import ViewBox from .widget import Widget diff --git a/stubs/vispy/scene/widgets/label.pyi b/stubs/vispy/scene/widgets/label.pyi index 2323367f..29d8e182 100644 --- a/stubs/vispy/scene/widgets/label.pyi +++ b/stubs/vispy/scene/widgets/label.pyi @@ -1,5 +1,4 @@ -from vispy.util.event import Event - +from ...util.event import Event from ...visuals import TextVisual from .widget import Widget diff --git a/stubs/vispy/scene/widgets/viewbox.pyi b/stubs/vispy/scene/widgets/viewbox.pyi index fc6069ec..b0fd86e0 100644 --- a/stubs/vispy/scene/widgets/viewbox.pyi +++ b/stubs/vispy/scene/widgets/viewbox.pyi @@ -1,9 +1,9 @@ import numpy as np -from vispy.scene.node import Node -from vispy.util.event import Event +from ...util.event import Event from ...visuals.filters import Clipper from ..cameras import BaseCamera, make_camera +from ..node import Node from ..subscene import SubScene from .widget import Widget diff --git a/stubs/vispy/util/check_environment.pyi b/stubs/vispy/util/check_environment.pyi index 1f5a503a..e0ad738b 100644 --- a/stubs/vispy/util/check_environment.pyi +++ b/stubs/vispy/util/check_environment.pyi @@ -4,8 +4,6 @@ import os from distutils.version import LooseVersion -from vispy.util import use_log_level - def has_matplotlib(version="1.2"): ... def has_skimage(version="0.11"): ... def has_backend(backend, has=..., capable=..., out=...): ... diff --git a/stubs/vispy/visuals/_scalable_textures.pyi b/stubs/vispy/visuals/_scalable_textures.pyi index d268ea18..007d9d24 100644 --- a/stubs/vispy/visuals/_scalable_textures.pyi +++ b/stubs/vispy/visuals/_scalable_textures.pyi @@ -6,8 +6,8 @@ import warnings import numpy as np from numpy import dtype from numpy.typing import NDArray -from vispy.gloo import Texture2D, Texture3D -from vispy.gloo.texture import should_cast_to_f32 + +from ..gloo import Texture2D, Texture3D def get_default_clim_from_dtype(dtype): ... def get_default_clim_from_data(data): ... diff --git a/stubs/vispy/visuals/axis.pyi b/stubs/vispy/visuals/axis.pyi index 1987977c..cbe864a5 100644 --- a/stubs/vispy/visuals/axis.pyi +++ b/stubs/vispy/visuals/axis.pyi @@ -3,8 +3,8 @@ from collections.abc import Iterable import numpy as np from numpy.typing import ArrayLike -from vispy.util.svg.color import Color +from ..util.svg.color import Color from .line import LineVisual from .text import TextVisual from .visual import CompoundVisual, updating_property diff --git a/stubs/vispy/visuals/border.pyi b/stubs/vispy/visuals/border.pyi index 0495d9ca..e3ef0292 100644 --- a/stubs/vispy/visuals/border.pyi +++ b/stubs/vispy/visuals/border.pyi @@ -1,5 +1,4 @@ import numpy as np -from vispy.color import Color from ..color import Color from . import Visual diff --git a/stubs/vispy/visuals/box.pyi b/stubs/vispy/visuals/box.pyi index b358d219..7944fa52 100644 --- a/stubs/vispy/visuals/box.pyi +++ b/stubs/vispy/visuals/box.pyi @@ -1,7 +1,7 @@ from numpy.typing import ArrayLike, NDArray -from vispy.util.svg.color import Color from ..geometry import create_box +from ..util.svg.color import Color from .mesh import MeshVisual from .visual import CompoundVisual diff --git a/stubs/vispy/visuals/collections/agg_path_collection.pyi b/stubs/vispy/visuals/collections/agg_path_collection.pyi index b669ad0f..20c70519 100644 --- a/stubs/vispy/visuals/collections/agg_path_collection.pyi +++ b/stubs/vispy/visuals/collections/agg_path_collection.pyi @@ -5,9 +5,9 @@ # ----------------------------------------------------------------------------- import numpy as np from numpy.typing import ArrayLike, NDArray -from vispy.util.svg.transform import Transform from ... import gloo, glsl +from ...util.svg.transform import Transform from ..transforms import NullTransform from .collection import Collection diff --git a/stubs/vispy/visuals/collections/agg_point_collection.pyi b/stubs/vispy/visuals/collections/agg_point_collection.pyi index 4e5ff792..8dafd944 100644 --- a/stubs/vispy/visuals/collections/agg_point_collection.pyi +++ b/stubs/vispy/visuals/collections/agg_point_collection.pyi @@ -1,5 +1,4 @@ from numpy.typing import ArrayLike -from vispy.util.svg.transform import Transform # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- @@ -7,6 +6,7 @@ from vispy.util.svg.transform import Transform # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- from ... import glsl +from ...util.svg.transform import Transform from .raw_point_collection import RawPointCollection class AggPointCollection(RawPointCollection): diff --git a/stubs/vispy/visuals/collections/array_list.pyi b/stubs/vispy/visuals/collections/array_list.pyi index 64928e0c..2091e64c 100644 --- a/stubs/vispy/visuals/collections/array_list.pyi +++ b/stubs/vispy/visuals/collections/array_list.pyi @@ -4,7 +4,6 @@ # Distributed under the terms of the new BSD License. # ----------------------------------------------------------------------------- import numpy as np -from np import dtype from numpy.typing import ArrayLike class ArrayList(object): diff --git a/stubs/vispy/visuals/collections/base_collection.pyi b/stubs/vispy/visuals/collections/base_collection.pyi index 0b632039..9ed817c6 100644 --- a/stubs/vispy/visuals/collections/base_collection.pyi +++ b/stubs/vispy/visuals/collections/base_collection.pyi @@ -2,10 +2,10 @@ import math import numpy as np from numpy.typing import ArrayLike, NDArray -from vispy.visuals.collections.collection import Collection from ...gloo import IndexBuffer, Texture2D, VertexBuffer from .array_list import ArrayList +from .collection import Collection from .util import dtype_reduce # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/collections/raw_path_collection.pyi b/stubs/vispy/visuals/collections/raw_path_collection.pyi index 42b1c88c..691b5721 100644 --- a/stubs/vispy/visuals/collections/raw_path_collection.pyi +++ b/stubs/vispy/visuals/collections/raw_path_collection.pyi @@ -5,9 +5,9 @@ # ----------------------------------------------------------------------------- import numpy as np from numpy.typing import ArrayLike, NDArray -from vispy.util.svg.transform import Transform from ... import glsl +from ...util.svg.transform import Transform from ..transforms import NullTransform from .collection import Collection diff --git a/stubs/vispy/visuals/collections/raw_point_collection.pyi b/stubs/vispy/visuals/collections/raw_point_collection.pyi index 8cf01fb7..8a141dda 100644 --- a/stubs/vispy/visuals/collections/raw_point_collection.pyi +++ b/stubs/vispy/visuals/collections/raw_point_collection.pyi @@ -1,8 +1,8 @@ import numpy as np from numpy.typing import ArrayLike, NDArray -from vispy.util.svg.transform import Transform from ... import glsl +from ...util.svg.transform import Transform from ..transforms import NullTransform from .collection import Collection diff --git a/stubs/vispy/visuals/cube.pyi b/stubs/vispy/visuals/cube.pyi index 7ec106ee..4db2cebe 100644 --- a/stubs/vispy/visuals/cube.pyi +++ b/stubs/vispy/visuals/cube.pyi @@ -1,8 +1,8 @@ import warnings from numpy.typing import NDArray -from vispy.util.svg.color import Color +from ..util.svg.color import Color from .box import BoxVisual # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/ellipse.pyi b/stubs/vispy/visuals/ellipse.pyi index 6c22d316..824e7ee9 100644 --- a/stubs/vispy/visuals/ellipse.pyi +++ b/stubs/vispy/visuals/ellipse.pyi @@ -1,7 +1,7 @@ import numpy as np from numpy.typing import ArrayLike -from vispy.util.svg.color import Color +from ..util.svg.color import Color from .polygon import PolygonVisual # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/filters/mesh.pyi b/stubs/vispy/visuals/filters/mesh.pyi index 356bd420..8069f88a 100644 --- a/stubs/vispy/visuals/filters/mesh.pyi +++ b/stubs/vispy/visuals/filters/mesh.pyi @@ -5,12 +5,10 @@ import numbers import numpy as np from numpy.typing import ArrayLike -from vispy.gloo import Texture2D, VertexBuffer -from vispy.util.svg.color import Color -from vispy.visuals.filters import Filter -from vispy.visuals.shaders import Function, Varying from ...color import Color +from ...util.svg.color import Color +from . import Filter class TextureFilter(Filter): def __init__(self, texture: tuple | ArrayLike, texcoords: ArrayLike, enabled: bool = True): ... diff --git a/stubs/vispy/visuals/gridlines.pyi b/stubs/vispy/visuals/gridlines.pyi index 1c967dd5..7798987d 100644 --- a/stubs/vispy/visuals/gridlines.pyi +++ b/stubs/vispy/visuals/gridlines.pyi @@ -1,6 +1,5 @@ -from vispy.util.svg.color import Color - from ..color import Color +from ..util.svg.color import Color from .image import ImageVisual from .shaders import Function diff --git a/stubs/vispy/visuals/histogram.pyi b/stubs/vispy/visuals/histogram.pyi index e9d43a9a..2c56e8fc 100644 --- a/stubs/vispy/visuals/histogram.pyi +++ b/stubs/vispy/visuals/histogram.pyi @@ -2,8 +2,8 @@ from typing import Literal import numpy as np from numpy.typing import ArrayLike -from vispy.util.svg.color import Color +from ..util.svg.color import Color from .mesh import MeshVisual # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/isocurve.pyi b/stubs/vispy/visuals/isocurve.pyi index c8c56180..a1c3b91b 100644 --- a/stubs/vispy/visuals/isocurve.pyi +++ b/stubs/vispy/visuals/isocurve.pyi @@ -1,8 +1,8 @@ import numpy as np from numpy.typing import NDArray -from vispy.color.color_array import Color from ..color import ColorArray +from ..color.color_array import Color from ..color.colormap import _normalize, get_colormap from ..geometry.isocurve import isocurve from .line import LineVisual diff --git a/stubs/vispy/visuals/isoline.pyi b/stubs/vispy/visuals/isoline.pyi index 5a42226c..85ec6609 100644 --- a/stubs/vispy/visuals/isoline.pyi +++ b/stubs/vispy/visuals/isoline.pyi @@ -1,11 +1,11 @@ import numpy as np from numpy import ndarray from numpy.typing import NDArray -from vispy._typing import ArrayLike -from vispy.util.svg.color import Color +from .._typing import ArrayLike from ..color import ColorArray from ..color.colormap import _normalize, get_colormap +from ..util.svg.color import Color from .line import LineVisual # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/isosurface.pyi b/stubs/vispy/visuals/isosurface.pyi index a8828157..395ccb93 100644 --- a/stubs/vispy/visuals/isosurface.pyi +++ b/stubs/vispy/visuals/isosurface.pyi @@ -1,10 +1,10 @@ from __future__ import division from numpy.typing import ArrayLike, NDArray -from vispy.util.svg.color import Color from ..color import Color from ..geometry.isosurface import isosurface +from ..util.svg.color import Color from .mesh import MeshVisual # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/line/arrow.pyi b/stubs/vispy/visuals/line/arrow.pyi index 33cbabf7..adc4e073 100644 --- a/stubs/vispy/visuals/line/arrow.pyi +++ b/stubs/vispy/visuals/line/arrow.pyi @@ -1,9 +1,8 @@ import numpy as np from numpy.typing import ArrayLike -from vispy.util.svg.color import Color -from vispy.visuals.line.arrow import ArrowVisual from ... import gloo, glsl +from ...util.svg.color import Color from ..transforms._util import as_vec4 from ..visual import Visual from .line import LineVisual diff --git a/stubs/vispy/visuals/line/line.pyi b/stubs/vispy/visuals/line/line.pyi index fca95f50..a6a7d223 100644 --- a/stubs/vispy/visuals/line/line.pyi +++ b/stubs/vispy/visuals/line/line.pyi @@ -2,7 +2,6 @@ from functools import lru_cache import numpy as np from numpy.typing import ArrayLike -from vispy.util.svg.color import Color from ... import gloo, glsl from ...color import Color, ColorArray, get_colormap diff --git a/stubs/vispy/visuals/line_plot.pyi b/stubs/vispy/visuals/line_plot.pyi index 9a116e04..46520359 100644 --- a/stubs/vispy/visuals/line_plot.pyi +++ b/stubs/vispy/visuals/line_plot.pyi @@ -1,7 +1,7 @@ import numpy as np from numpy.typing import ArrayLike -from vispy.util.svg.color import Color +from ..util.svg.color import Color from .line import LineVisual from .markers import MarkersVisual from .visual import CompoundVisual diff --git a/stubs/vispy/visuals/markers.pyi b/stubs/vispy/visuals/markers.pyi index 20937b44..04248973 100644 --- a/stubs/vispy/visuals/markers.pyi +++ b/stubs/vispy/visuals/markers.pyi @@ -2,10 +2,10 @@ import warnings import numpy as np from numpy.typing import ArrayLike -from vispy.util.svg.color import Color from ..color import ColorArray from ..gloo import VertexBuffer, _check_valid +from ..util.svg.color import Color from .shaders import Function, Variable from .visual import Visual diff --git a/stubs/vispy/visuals/mesh.pyi b/stubs/vispy/visuals/mesh.pyi index 0852b25d..89e3ab38 100644 --- a/stubs/vispy/visuals/mesh.pyi +++ b/stubs/vispy/visuals/mesh.pyi @@ -4,14 +4,14 @@ from functools import lru_cache import numpy as np from numpy.typing import ArrayLike -from vispy.geometry.meshdata import MeshData -from vispy.util.svg.color import Color from ..color import Color, get_colormap from ..color.colormap import CubeHelixColormap from ..geometry import MeshData +from ..geometry.meshdata import MeshData from ..gloo import VertexBuffer from ..util.event import Event +from ..util.svg.color import Color from .shaders import Function, FunctionChain from .visual import Visual diff --git a/stubs/vispy/visuals/plane.pyi b/stubs/vispy/visuals/plane.pyi index be1fc8cd..085cb710 100644 --- a/stubs/vispy/visuals/plane.pyi +++ b/stubs/vispy/visuals/plane.pyi @@ -1,7 +1,7 @@ from numpy.typing import NDArray -from vispy.util.svg.color import Color from ..geometry import create_plane +from ..util.svg.color import Color from .mesh import MeshVisual from .visual import CompoundVisual diff --git a/stubs/vispy/visuals/rectangle.pyi b/stubs/vispy/visuals/rectangle.pyi index a9d6ad19..5673eb09 100644 --- a/stubs/vispy/visuals/rectangle.pyi +++ b/stubs/vispy/visuals/rectangle.pyi @@ -1,8 +1,8 @@ import numpy as np from numpy.typing import ArrayLike -from vispy.util.svg.color import Color from ..color import Color +from ..util.svg.color import Color from .polygon import PolygonVisual # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/sphere.pyi b/stubs/vispy/visuals/sphere.pyi index cc95566d..44275fe4 100644 --- a/stubs/vispy/visuals/sphere.pyi +++ b/stubs/vispy/visuals/sphere.pyi @@ -1,7 +1,7 @@ from numpy.typing import NDArray -from vispy.util.svg.color import Color from ..geometry import create_sphere +from ..util.svg.color import Color from .mesh import MeshVisual from .visual import CompoundVisual diff --git a/stubs/vispy/visuals/text/_sdf_gpu.pyi b/stubs/vispy/visuals/text/_sdf_gpu.pyi index 39fbcb1f..c55104e0 100644 --- a/stubs/vispy/visuals/text/_sdf_gpu.pyi +++ b/stubs/vispy/visuals/text/_sdf_gpu.pyi @@ -1,6 +1,5 @@ import numpy as np from numpy.typing import ArrayLike -from vispy.gloo.texture import Texture2D from ...gloo import FrameBuffer, Program, Texture2D, VertexBuffer, set_state, set_viewport diff --git a/stubs/vispy/visuals/text/text.pyi b/stubs/vispy/visuals/text/text.pyi index af9343ea..cd92f783 100644 --- a/stubs/vispy/visuals/text/text.pyi +++ b/stubs/vispy/visuals/text/text.pyi @@ -4,12 +4,12 @@ from typing import Any, Mapping import numpy as np from numpy.typing import ArrayLike -from vispy.util.svg.color import Color from ...color import ColorArray from ...gloo import IndexBuffer, TextureAtlas, VertexBuffer, context from ...gloo.wrappers import _check_valid from ...io import load_spatial_filters +from ...util.svg.color import Color from ..transforms import STTransform from ..visual import Visual from ._sdf_gpu import SDFRendererGPU diff --git a/stubs/vispy/visuals/transforms/chain.pyi b/stubs/vispy/visuals/transforms/chain.pyi index 27820415..feb93fd0 100644 --- a/stubs/vispy/visuals/transforms/chain.pyi +++ b/stubs/vispy/visuals/transforms/chain.pyi @@ -1,8 +1,8 @@ from typing import Sequence from numpy.typing import ArrayLike, NDArray -from vispy.util.svg.transform import Transform +from ...util.svg.transform import Transform from ..shaders import FunctionChain from .base_transform import BaseTransform from .linear import NullTransform diff --git a/stubs/vispy/visuals/transforms/interactive.pyi b/stubs/vispy/visuals/transforms/interactive.pyi index e0381520..4c4ce8a6 100644 --- a/stubs/vispy/visuals/transforms/interactive.pyi +++ b/stubs/vispy/visuals/transforms/interactive.pyi @@ -1,7 +1,7 @@ import numpy as np -from vispy.app.canvas import Canvas -from vispy.util.event import Event +from ...app.canvas import Canvas +from ...util.event import Event from .linear import STTransform # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/transforms/linear.pyi b/stubs/vispy/visuals/transforms/linear.pyi index aba2e28e..04c5a5c2 100644 --- a/stubs/vispy/visuals/transforms/linear.pyi +++ b/stubs/vispy/visuals/transforms/linear.pyi @@ -1,7 +1,6 @@ import numpy as np from numpy import ndarray from numpy.typing import ArrayLike, NDArray -from vispy.visuals.transforms.linear import STTransform from ...geometry import Rect from ...util import transforms diff --git a/stubs/vispy/visuals/transforms/transform_system.pyi b/stubs/vispy/visuals/transforms/transform_system.pyi index e28e6c3d..98155b57 100644 --- a/stubs/vispy/visuals/transforms/transform_system.pyi +++ b/stubs/vispy/visuals/transforms/transform_system.pyi @@ -1,8 +1,8 @@ from __future__ import division import numpy as np -from vispy.app.canvas import Canvas +from ...app.canvas import Canvas from ...util.event import EventEmitter from ._util import TransformCache from .chain import ChainTransform diff --git a/stubs/vispy/visuals/tube.pyi b/stubs/vispy/visuals/tube.pyi index 0504526d..ff29dbcc 100644 --- a/stubs/vispy/visuals/tube.pyi +++ b/stubs/vispy/visuals/tube.pyi @@ -3,10 +3,10 @@ import collections import numpy as np from numpy.linalg import norm from numpy.typing import NDArray -from vispy.color.color_array import ColorArray -from vispy.util.svg.color import Color from ..color import ColorArray +from ..color.color_array import ColorArray +from ..util.svg.color import Color from ..util.transforms import rotate from .mesh import MeshVisual diff --git a/stubs/vispy/visuals/visual.pyi b/stubs/vispy/visuals/visual.pyi index 06152912..9a79ff4d 100644 --- a/stubs/vispy/visuals/visual.pyi +++ b/stubs/vispy/visuals/visual.pyi @@ -8,9 +8,9 @@ import weakref from typing import Any, Sequence import numpy as np -from vispy.gloo.program import Program from .. import gloo +from ..gloo.program import Program from ..util import Frozen, logger from ..util.event import EmitterGroup, Event from .shaders import MultiProgram, StatementList diff --git a/stubs/vispy/visuals/windbarb.pyi b/stubs/vispy/visuals/windbarb.pyi index cff559ad..db2e65ea 100644 --- a/stubs/vispy/visuals/windbarb.pyi +++ b/stubs/vispy/visuals/windbarb.pyi @@ -1,11 +1,9 @@ import numpy as np from numpy.typing import ArrayLike -from vispy.color import ColorArray -from vispy.color.color_array import ColorArray -from vispy.gloo import VertexBuffer -from vispy.util.svg.color import Color -from vispy.visuals.shaders import Variable -from vispy.visuals.visual import Visual + +from ..color import ColorArray +from ..util.svg.color import Color +from .visual import Visual # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- diff --git a/tests/requirements.txt b/tests/requirements.txt index d8683641..31dee84e 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -5,6 +5,7 @@ pyright # Typed libraries and stubs matplotlib>=3.8 +pandas-stubs pytest scipy-stubs typing_extensions @@ -13,10 +14,8 @@ typing_extensions joblib networkx PyOpenGL -scikit-image scikit-learn transformers -vispy numpydoc pyamg traitlets