From 057c01d26ccb0aebbe05e5f44172ea3445da849d Mon Sep 17 00:00:00 2001 From: Avasam Date: Thu, 7 Nov 2024 23:04:19 -0500 Subject: [PATCH] Apply pycodestyles autofixes --- pyproject.toml | 30 +++++++++++++- stubs/matplotlib/__init__.pyi | 5 +-- stubs/matplotlib/_afm.pyi | 1 - stubs/matplotlib/_api/__init__.pyi | 2 +- stubs/matplotlib/_mathtext.pyi | 1 - stubs/matplotlib/_pylab_helpers.pyi | 2 +- stubs/matplotlib/animation.pyi | 4 +- stubs/matplotlib/axes/_axes.pyi | 1 - stubs/matplotlib/axes/_secondary_axes.pyi | 1 - stubs/matplotlib/axis.pyi | 1 - stubs/matplotlib/backends/backend_agg.pyi | 2 +- stubs/matplotlib/backends/backend_pdf.pyi | 2 +- stubs/matplotlib/backends/backend_pgf.pyi | 2 - stubs/matplotlib/category.pyi | 2 +- stubs/matplotlib/collections.pyi | 1 - stubs/matplotlib/figure.pyi | 2 +- stubs/matplotlib/offsetbox.pyi | 2 +- stubs/matplotlib/pyplot.pyi | 7 +--- stubs/matplotlib/quiver.pyi | 2 +- stubs/matplotlib/scale.pyi | 2 +- stubs/matplotlib/spines.pyi | 2 +- stubs/matplotlib/ticker.pyi | 2 +- stubs/matplotlib/widgets.pyi | 13 ++----- stubs/networkx/__init__.pyi | 1 - .../algorithms/approximation/clique.pyi | 1 - .../approximation/clustering_coefficient.pyi | 2 +- .../algorithms/approximation/connectivity.pyi | 2 - .../approximation/dominating_set.pyi | 2 - .../algorithms/approximation/kcomponents.pyi | 5 --- .../algorithms/approximation/maxcut.pyi | 2 +- .../algorithms/approximation/ramsey.pyi | 1 - .../algorithms/approximation/steinertree.pyi | 2 - .../approximation/traveling_salesman.pyi | 4 +- .../algorithms/approximation/treewidth.pyi | 4 -- .../algorithms/assortativity/connectivity.pyi | 1 - .../algorithms/assortativity/correlation.pyi | 2 - .../algorithms/assortativity/mixing.pyi | 2 - stubs/networkx/algorithms/asteroidal.pyi | 1 - stubs/networkx/algorithms/bipartite/basic.pyi | 2 - .../networkx/algorithms/bipartite/cluster.pyi | 1 - .../algorithms/bipartite/covering.pyi | 3 -- .../algorithms/bipartite/edgelist.pyi | 1 - .../algorithms/bipartite/generators.pyi | 6 +-- .../algorithms/bipartite/matching.pyi | 3 -- .../networkx/algorithms/bipartite/matrix.pyi | 1 - .../algorithms/bipartite/projection.pyi | 3 -- .../algorithms/bipartite/redundancy.pyi | 3 -- stubs/networkx/algorithms/boundary.pyi | 1 - stubs/networkx/algorithms/bridges.pyi | 2 - .../algorithms/centrality/betweenness.pyi | 5 --- .../centrality/betweenness_subset.pyi | 1 - .../algorithms/centrality/closeness.pyi | 3 -- .../centrality/current_flow_betweenness.pyi | 3 +- .../current_flow_betweenness_subset.pyi | 2 - .../centrality/current_flow_closeness.pyi | 2 - .../algorithms/centrality/degree_alg.pyi | 1 - .../algorithms/centrality/dispersion.pyi | 1 - .../algorithms/centrality/eigenvector.pyi | 2 - .../networkx/algorithms/centrality/group.pyi | 2 - .../algorithms/centrality/harmonic.pyi | 1 - stubs/networkx/algorithms/centrality/katz.pyi | 2 - stubs/networkx/algorithms/centrality/load.pyi | 1 - .../algorithms/centrality/reaching.pyi | 2 - .../algorithms/centrality/second_order.pyi | 1 - .../algorithms/centrality/subgraph_alg.pyi | 1 - .../algorithms/centrality/trophic.pyi | 1 - stubs/networkx/algorithms/chains.pyi | 1 - stubs/networkx/algorithms/chordal.pyi | 4 -- stubs/networkx/algorithms/clique.pyi | 3 -- stubs/networkx/algorithms/cluster.pyi | 3 -- .../coloring/equitable_coloring.pyi | 1 - .../algorithms/coloring/greedy_coloring.pyi | 4 +- .../algorithms/communicability_alg.pyi | 2 - .../algorithms/community/asyn_fluid.pyi | 5 +-- .../networkx/algorithms/community/kclique.pyi | 1 - .../algorithms/community/kernighan_lin.pyi | 4 +- .../community/label_propagation.pyi | 3 +- .../networkx/algorithms/community/louvain.pyi | 1 - stubs/networkx/algorithms/community/lukes.pyi | 4 -- .../algorithms/community/modularity_max.pyi | 4 -- .../networkx/algorithms/community/quality.pyi | 4 -- .../algorithms/components/attracting.pyi | 1 - .../algorithms/components/biconnected.pyi | 2 - .../algorithms/components/connected.pyi | 2 - .../algorithms/components/semiconnected.pyi | 1 - .../components/strongly_connected.pyi | 1 - .../components/weakly_connected.pyi | 1 - .../algorithms/connectivity/connectivity.pyi | 4 -- .../networkx/algorithms/connectivity/cuts.pyi | 3 -- .../connectivity/disjoint_paths.pyi | 4 -- .../connectivity/edge_augmentation.pyi | 5 +-- .../connectivity/edge_kcomponents.pyi | 4 -- .../algorithms/connectivity/kcomponents.pyi | 5 --- .../algorithms/connectivity/kcutsets.pyi | 6 --- .../algorithms/connectivity/stoerwagner.pyi | 2 - stubs/networkx/algorithms/core.pyi | 2 - stubs/networkx/algorithms/covering.pyi | 3 -- stubs/networkx/algorithms/cuts.pyi | 1 - stubs/networkx/algorithms/cycles.pyi | 2 - stubs/networkx/algorithms/d_separation.pyi | 2 - stubs/networkx/algorithms/dag.pyi | 6 --- .../networkx/algorithms/distance_measures.pyi | 1 - .../networkx/algorithms/distance_regular.pyi | 2 - stubs/networkx/algorithms/dominance.pyi | 2 - stubs/networkx/algorithms/dominating.pyi | 2 - .../algorithms/efficiency_measures.pyi | 2 - stubs/networkx/algorithms/euler.pyi | 2 - .../algorithms/flow/boykovkolmogorov.pyi | 3 -- .../algorithms/flow/capacityscaling.pyi | 3 -- stubs/networkx/algorithms/flow/dinitz_alg.pyi | 3 -- .../networkx/algorithms/flow/edmondskarp.pyi | 1 - stubs/networkx/algorithms/flow/gomory_hu.pyi | 3 -- stubs/networkx/algorithms/flow/maxflow.pyi | 6 --- .../algorithms/flow/networksimplex.pyi | 3 -- .../networkx/algorithms/flow/preflowpush.pyi | 4 -- .../flow/shortestaugmentingpath.pyi | 3 -- stubs/networkx/algorithms/flow/utils.pyi | 1 - stubs/networkx/algorithms/graph_hashing.pyi | 2 - stubs/networkx/algorithms/graphical.pyi | 3 -- stubs/networkx/algorithms/hybrid.pyi | 1 - .../algorithms/isomorphism/ismags.pyi | 3 -- .../algorithms/isomorphism/isomorph.pyi | 1 - .../algorithms/isomorphism/isomorphvf2.pyi | 1 - .../algorithms/isomorphism/matchhelpers.pyi | 5 --- .../isomorphism/tree_isomorphism.pyi | 1 - .../algorithms/link_analysis/pagerank_alg.pyi | 1 - stubs/networkx/algorithms/link_prediction.pyi | 2 - .../algorithms/lowest_common_ancestors.pyi | 4 -- stubs/networkx/algorithms/matching.pyi | 3 -- .../algorithms/minors/contraction.pyi | 3 -- stubs/networkx/algorithms/mis.pyi | 2 +- stubs/networkx/algorithms/moral.pyi | 2 - .../algorithms/node_classification/hmn.pyi | 1 - .../algorithms/node_classification/lgc.pyi | 1 - .../algorithms/node_classification/utils.pyi | 1 - stubs/networkx/algorithms/non_randomness.pyi | 2 - stubs/networkx/algorithms/operators/all.pyi | 1 - .../networkx/algorithms/operators/product.pyi | 2 - stubs/networkx/algorithms/planar_drawing.pyi | 3 -- stubs/networkx/algorithms/planarity.pyi | 1 - stubs/networkx/algorithms/polynomials.pyi | 2 - stubs/networkx/algorithms/reciprocity.pyi | 3 -- stubs/networkx/algorithms/regular.pyi | 1 - stubs/networkx/algorithms/richclub.pyi | 2 - .../algorithms/shortest_paths/astar.pyi | 2 - .../algorithms/shortest_paths/weighted.pyi | 3 -- stubs/networkx/algorithms/similarity.pyi | 6 --- stubs/networkx/algorithms/simple_paths.pyi | 3 -- stubs/networkx/algorithms/smallworld.pyi | 2 +- stubs/networkx/algorithms/sparsifiers.pyi | 3 +- stubs/networkx/algorithms/summarization.pyi | 1 - stubs/networkx/algorithms/swap.pyi | 1 - stubs/networkx/algorithms/threshold.pyi | 1 - stubs/networkx/algorithms/tournament.pyi | 4 +- .../algorithms/traversal/beamsearch.pyi | 1 - .../traversal/breadth_first_search.pyi | 1 - .../traversal/depth_first_search.pyi | 1 - .../networkx/algorithms/traversal/edgebfs.pyi | 1 - stubs/networkx/algorithms/tree/branchings.pyi | 6 --- stubs/networkx/algorithms/tree/coding.pyi | 4 -- .../algorithms/tree/decomposition.pyi | 3 -- stubs/networkx/algorithms/tree/mst.pyi | 8 +--- stubs/networkx/algorithms/tree/operations.pyi | 4 -- stubs/networkx/algorithms/triads.pyi | 4 -- stubs/networkx/algorithms/vitality.pyi | 1 - stubs/networkx/algorithms/voronoi.pyi | 1 - stubs/networkx/algorithms/wiener.pyi | 3 -- stubs/networkx/classes/coreviews.pyi | 1 - stubs/networkx/classes/digraph.pyi | 7 +--- stubs/networkx/classes/function.pyi | 3 -- stubs/networkx/classes/graph.pyi | 4 -- stubs/networkx/classes/graphviews.pyi | 4 -- stubs/networkx/classes/multidigraph.pyi | 8 +--- stubs/networkx/classes/multigraph.pyi | 5 --- stubs/networkx/classes/ordered.pyi | 2 - stubs/networkx/conftest.pyi | 3 -- stubs/networkx/convert.pyi | 2 - stubs/networkx/convert_matrix.pyi | 4 -- stubs/networkx/drawing/nx_agraph.pyi | 2 - stubs/networkx/drawing/nx_pydot.pyi | 3 -- stubs/networkx/drawing/nx_pylab.pyi | 10 ----- stubs/networkx/generators/atlas.pyi | 6 --- stubs/networkx/generators/classic.pyi | 7 +--- stubs/networkx/generators/cographs.pyi | 1 - stubs/networkx/generators/community.pyi | 3 -- stubs/networkx/generators/degree_seq.pyi | 6 +-- stubs/networkx/generators/directed.pyi | 6 +-- stubs/networkx/generators/duplication.pyi | 1 - stubs/networkx/generators/expanders.pyi | 2 - stubs/networkx/generators/geometric.pyi | 3 -- stubs/networkx/generators/harary_graph.pyi | 2 - .../generators/internet_as_graphs.pyi | 1 - stubs/networkx/generators/intersection.pyi | 1 - stubs/networkx/generators/interval_graph.pyi | 2 - stubs/networkx/generators/lattice.pyi | 8 ---- stubs/networkx/generators/line.pyi | 5 --- stubs/networkx/generators/mycielski.pyi | 1 - .../generators/nonisomorphic_trees.pyi | 1 - .../networkx/generators/random_clustered.pyi | 1 - stubs/networkx/generators/random_graphs.pyi | 5 --- stubs/networkx/generators/small.pyi | 4 -- stubs/networkx/generators/social.pyi | 1 - stubs/networkx/generators/stochastic.pyi | 2 - stubs/networkx/generators/sudoku.pyi | 2 - stubs/networkx/generators/trees.pyi | 2 - stubs/networkx/lazy_imports.pyi | 5 --- .../networkx/linalg/algebraicconnectivity.pyi | 3 +- stubs/networkx/linalg/bethehessianmatrix.pyi | 1 - stubs/networkx/linalg/laplacianmatrix.pyi | 1 - stubs/networkx/linalg/modularitymatrix.pyi | 1 - stubs/networkx/readwrite/adjlist.pyi | 1 - stubs/networkx/readwrite/edgelist.pyi | 1 - stubs/networkx/readwrite/gexf.pyi | 4 -- stubs/networkx/readwrite/gml.pyi | 8 ---- stubs/networkx/readwrite/gpickle.pyi | 3 -- stubs/networkx/readwrite/graph6.pyi | 4 -- stubs/networkx/readwrite/graphml.pyi | 3 -- .../readwrite/json_graph/adjacency.pyi | 1 - stubs/networkx/readwrite/json_graph/jit.pyi | 3 -- .../readwrite/json_graph/node_link.pyi | 1 - stubs/networkx/readwrite/json_graph/tree.pyi | 1 - stubs/networkx/readwrite/leda.pyi | 3 -- .../networkx/readwrite/multiline_adjlist.pyi | 1 - stubs/networkx/readwrite/nx_shp.pyi | 1 - stubs/networkx/readwrite/p2g.pyi | 2 - stubs/networkx/readwrite/pajek.pyi | 2 - stubs/networkx/readwrite/sparse6.pyi | 3 -- stubs/networkx/testing/test.pyi | 1 - stubs/networkx/testing/utils.pyi | 2 - stubs/networkx/utils/contextmanagers.pyi | 1 - stubs/networkx/utils/decorators.pyi | 13 ------- stubs/networkx/utils/heaps.pyi | 4 -- stubs/networkx/utils/mapped_queue.pyi | 1 - stubs/networkx/utils/misc.pyi | 7 ---- stubs/networkx/utils/random_sequence.pyi | 1 - stubs/networkx/utils/rcm.pyi | 3 -- stubs/networkx/utils/union_find.pyi | 1 - stubs/skimage/_shared/_dependency_checks.pyi | 1 - stubs/skimage/_shared/_geometry.pyi | 1 - stubs/skimage/_shared/_tempfile.pyi | 2 - stubs/skimage/_shared/_warnings.pyi | 5 --- stubs/skimage/_shared/coord.pyi | 2 - stubs/skimage/_shared/filters.pyi | 4 -- stubs/skimage/_shared/lazy.pyi | 4 -- stubs/skimage/_shared/setup.pyi | 1 - stubs/skimage/_shared/tester.pyi | 2 - stubs/skimage/_shared/testing.pyi | 25 ------------ stubs/skimage/_shared/utils.pyi | 7 ---- .../skimage/_shared/version_requirements.pyi | 2 - stubs/skimage/data/_binary_blobs.pyi | 3 -- stubs/skimage/data/_fetchers.pyi | 9 ----- stubs/skimage/draw/_polygon2mask.pyi | 2 - stubs/skimage/draw/_random_shapes.pyi | 5 +-- stubs/skimage/draw/draw.pyi | 2 - stubs/skimage/draw/draw3d.pyi | 2 - stubs/skimage/draw/draw_nd.pyi | 1 - stubs/skimage/draw/setup.pyi | 1 - stubs/skimage/feature/_basic_features.pyi | 4 -- stubs/skimage/feature/_canny.pyi | 4 -- stubs/skimage/feature/_daisy.pyi | 7 ---- .../feature/_hessian_det_appx_pythran.pyi | 1 - stubs/skimage/feature/_hog.pyi | 1 - .../feature/_orb_descriptor_positions.pyi | 2 - stubs/skimage/feature/blob.pyi | 9 ----- stubs/skimage/feature/brief.pyi | 6 +-- stubs/skimage/feature/brief_pythran.pyi | 1 - stubs/skimage/feature/censure.pyi | 8 +--- stubs/skimage/feature/corner.pyi | 10 ----- stubs/skimage/feature/haar.pyi | 5 --- stubs/skimage/feature/match.pyi | 2 - stubs/skimage/feature/orb.pyi | 6 +-- stubs/skimage/feature/peak.pyi | 5 --- stubs/skimage/feature/sift.pyi | 6 --- stubs/skimage/feature/template.pyi | 4 -- stubs/skimage/feature/texture.pyi | 3 -- stubs/skimage/feature/util.pyi | 4 -- stubs/skimage/future/graph/_ncut.pyi | 3 -- stubs/skimage/future/graph/graph_cut.pyi | 4 -- stubs/skimage/future/graph/graph_merge.pyi | 2 - stubs/skimage/future/graph/rag.pyi | 4 -- stubs/skimage/future/graph/setup.pyi | 1 - stubs/skimage/future/manual_segmentation.pyi | 3 -- .../skimage/future/trainable_segmentation.pyi | 2 - stubs/skimage/measure/_blur_effect.pyi | 2 - stubs/skimage/measure/_find_contours.pyi | 2 - stubs/skimage/measure/_label.pyi | 1 - .../measure/_marching_cubes_classic.pyi | 2 - .../measure/_marching_cubes_lewiner.pyi | 4 -- stubs/skimage/measure/_moments.pyi | 4 -- stubs/skimage/measure/_polygon.pyi | 2 - stubs/skimage/measure/_regionprops.pyi | 10 ----- stubs/skimage/measure/_regionprops_utils.pyi | 3 -- stubs/skimage/measure/block.pyi | 1 - stubs/skimage/measure/entropy.pyi | 2 - stubs/skimage/measure/fit.pyi | 5 --- stubs/skimage/measure/profile.pyi | 4 -- stubs/skimage/measure/setup.pyi | 1 - stubs/skimage/morphology/_flood_fill.pyi | 2 - stubs/skimage/morphology/_skeletonize.pyi | 4 +- stubs/skimage/morphology/_util.pyi | 2 - stubs/skimage/morphology/binary.pyi | 2 - stubs/skimage/morphology/convex_hull.pyi | 6 --- stubs/skimage/morphology/extrema.pyi | 4 +- stubs/skimage/morphology/footprints.pyi | 3 -- stubs/skimage/morphology/gray.pyi | 3 -- stubs/skimage/morphology/grayreconstruct.pyi | 1 - stubs/skimage/morphology/grey.pyi | 1 - stubs/skimage/morphology/greyreconstruct.pyi | 2 - stubs/skimage/morphology/max_tree.pyi | 3 -- stubs/skimage/morphology/misc.pyi | 6 +-- stubs/skimage/morphology/selem.pyi | 2 - stubs/skimage/morphology/setup.pyi | 1 - stubs/skimage/transform/_geometric.pyi | 6 --- stubs/skimage/transform/_warps.pyi | 12 ------ .../transform/finite_radon_transform.pyi | 2 - stubs/skimage/transform/hough_transform.pyi | 1 - stubs/skimage/transform/integral.pyi | 1 - stubs/skimage/transform/pyramids.pyi | 5 --- stubs/skimage/transform/radon_transform.pyi | 9 ----- stubs/skimage/transform/setup.pyi | 1 - stubs/sklearn/__check_build/__init__.pyi | 1 - stubs/sklearn/__check_build/setup.pyi | 3 -- stubs/sklearn/_build_utils/openmp_helpers.pyi | 4 -- .../_build_utils/pre_build_helpers.pyi | 6 --- stubs/sklearn/_config.pyi | 2 - stubs/sklearn/_loss/glm_distribution.pyi | 2 - stubs/sklearn/_loss/link.pyi | 1 - stubs/sklearn/_loss/loss.pyi | 4 -- stubs/sklearn/_loss/setup.pyi | 4 -- stubs/sklearn/_min_dependencies.pyi | 2 - stubs/sklearn/base.pyi | 6 --- stubs/sklearn/calibration.pyi | 2 - .../sklearn/cluster/_affinity_propagation.pyi | 2 - stubs/sklearn/cluster/_agglomerative.pyi | 4 +- stubs/sklearn/cluster/_bicluster.pyi | 1 - stubs/sklearn/cluster/_birch.pyi | 2 - stubs/sklearn/cluster/_bisect_k_means.pyi | 3 -- stubs/sklearn/cluster/_dbscan.pyi | 2 - .../cluster/_feature_agglomeration.pyi | 1 - stubs/sklearn/cluster/_kmeans.pyi | 3 -- stubs/sklearn/cluster/_mean_shift.pyi | 2 - stubs/sklearn/cluster/_optics.pyi | 2 - stubs/sklearn/cluster/_spectral.pyi | 2 - stubs/sklearn/cluster/setup.pyi | 4 -- stubs/sklearn/compose/_column_transformer.pyi | 1 - stubs/sklearn/compose/_target.pyi | 2 - stubs/sklearn/conftest.pyi | 4 -- .../sklearn/covariance/_elliptic_envelope.pyi | 1 - .../covariance/_empirical_covariance.pyi | 2 - stubs/sklearn/covariance/_graph_lasso.pyi | 5 --- .../sklearn/covariance/_robust_covariance.pyi | 2 - .../sklearn/covariance/_shrunk_covariance.pyi | 2 - stubs/sklearn/cross_decomposition/_pls.pyi | 2 - stubs/sklearn/datasets/_arff_parser.pyi | 4 -- stubs/sklearn/datasets/_base.pyi | 6 --- .../sklearn/datasets/_california_housing.pyi | 5 --- stubs/sklearn/datasets/_covtype.pyi | 4 -- stubs/sklearn/datasets/_kddcup99.pyi | 7 +--- stubs/sklearn/datasets/_lfw.pyi | 2 - stubs/sklearn/datasets/_olivetti_faces.pyi | 2 - stubs/sklearn/datasets/_openml.pyi | 9 ----- stubs/sklearn/datasets/_rcv1.pyi | 6 +-- stubs/sklearn/datasets/_samples_generator.pyi | 7 +--- .../datasets/_species_distributions.pyi | 3 -- .../sklearn/datasets/_svmlight_format_io.pyi | 4 -- stubs/sklearn/datasets/_twenty_newsgroups.pyi | 10 ----- stubs/sklearn/datasets/setup.pyi | 5 --- stubs/sklearn/decomposition/_base.pyi | 1 - .../sklearn/decomposition/_dict_learning.pyi | 5 --- .../decomposition/_factor_analysis.pyi | 2 - stubs/sklearn/decomposition/_fastica.pyi | 2 - .../decomposition/_incremental_pca.pyi | 1 - stubs/sklearn/decomposition/_kernel_pca.pyi | 1 - stubs/sklearn/decomposition/_lda.pyi | 3 -- stubs/sklearn/decomposition/_nmf.pyi | 5 --- stubs/sklearn/decomposition/_pca.pyi | 1 - stubs/sklearn/decomposition/_sparse_pca.pyi | 1 - .../sklearn/decomposition/_truncated_svd.pyi | 2 - stubs/sklearn/decomposition/setup.pyi | 4 -- stubs/sklearn/discriminant_analysis.pyi | 4 -- stubs/sklearn/dummy.pyi | 3 -- stubs/sklearn/ensemble/_bagging.pyi | 3 -- stubs/sklearn/ensemble/_base.pyi | 2 - stubs/sklearn/ensemble/_forest.pyi | 4 +- stubs/sklearn/ensemble/_gb.pyi | 2 - stubs/sklearn/ensemble/_gb_losses.pyi | 1 - .../_hist_gradient_boosting/binning.pyi | 1 - .../_hist_gradient_boosting/common.pyi | 3 -- .../gradient_boosting.pyi | 4 -- .../_hist_gradient_boosting/grower.pyi | 3 -- .../_hist_gradient_boosting/predictor.pyi | 1 - stubs/sklearn/ensemble/_iforest.pyi | 3 -- stubs/sklearn/ensemble/_stacking.pyi | 2 - stubs/sklearn/ensemble/_voting.pyi | 1 - stubs/sklearn/ensemble/_weight_boosting.pyi | 2 - stubs/sklearn/ensemble/setup.pyi | 3 -- .../enable_hist_gradient_boosting.pyi | 2 - stubs/sklearn/externals/_arff.pyi | 2 - stubs/sklearn/externals/_lobpcg.pyi | 5 +-- .../externals/_numpy_compiler_patch.pyi | 7 ---- .../feature_extraction/_dict_vectorizer.pyi | 2 - stubs/sklearn/feature_extraction/_hash.pyi | 3 -- stubs/sklearn/feature_extraction/image.pyi | 1 - stubs/sklearn/feature_extraction/setup.pyi | 2 - stubs/sklearn/feature_extraction/text.pyi | 6 --- stubs/sklearn/feature_selection/_base.pyi | 2 - .../sklearn/feature_selection/_from_model.pyi | 1 - .../feature_selection/_mutual_info.pyi | 1 - stubs/sklearn/feature_selection/_rfe.pyi | 1 - .../sklearn/feature_selection/_sequential.pyi | 2 - .../_univariate_selection.pyi | 4 +- .../feature_selection/_variance_threshold.pyi | 1 - stubs/sklearn/gaussian_process/_gpc.pyi | 6 +-- stubs/sklearn/gaussian_process/_gpr.pyi | 5 +-- stubs/sklearn/gaussian_process/kernels.pyi | 5 +-- stubs/sklearn/impute/_base.pyi | 5 --- stubs/sklearn/impute/_iterative.pyi | 2 - stubs/sklearn/impute/_knn.pyi | 1 - .../inspection/_partial_dependence.pyi | 1 - .../inspection/_permutation_importance.pyi | 2 - .../inspection/_plot/decision_boundary.pyi | 1 - .../inspection/_plot/partial_dependence.pyi | 3 -- stubs/sklearn/inspection/setup.pyi | 2 - stubs/sklearn/isotonic.pyi | 3 -- stubs/sklearn/kernel_approximation.pyi | 3 -- stubs/sklearn/kernel_ridge.pyi | 1 - stubs/sklearn/linear_model/_base.pyi | 6 +-- stubs/sklearn/linear_model/_bayes.pyi | 1 - .../linear_model/_coordinate_descent.pyi | 4 -- .../linear_model/_glm/_newton_solver.pyi | 4 -- stubs/sklearn/linear_model/_glm/glm.pyi | 4 +- stubs/sklearn/linear_model/_huber.pyi | 1 - stubs/sklearn/linear_model/_least_angle.pyi | 3 -- stubs/sklearn/linear_model/_linear_loss.pyi | 1 - stubs/sklearn/linear_model/_logistic.pyi | 3 -- stubs/sklearn/linear_model/_omp.pyi | 2 - stubs/sklearn/linear_model/_quantile.pyi | 2 - stubs/sklearn/linear_model/_ransac.pyi | 2 - stubs/sklearn/linear_model/_ridge.pyi | 6 +-- stubs/sklearn/linear_model/_sag.pyi | 2 - .../linear_model/_stochastic_gradient.pyi | 2 - stubs/sklearn/linear_model/_theil_sen.pyi | 2 - stubs/sklearn/linear_model/setup.pyi | 5 --- stubs/sklearn/manifold/_isomap.pyi | 2 - stubs/sklearn/manifold/_locally_linear.pyi | 1 - stubs/sklearn/manifold/_mds.pyi | 2 - .../sklearn/manifold/_spectral_embedding.pyi | 4 +- stubs/sklearn/manifold/_t_sne.pyi | 2 - stubs/sklearn/manifold/setup.pyi | 4 -- stubs/sklearn/metrics/_base.pyi | 2 - stubs/sklearn/metrics/_classification.pyi | 2 - .../metrics/_plot/confusion_matrix.pyi | 2 - stubs/sklearn/metrics/_plot/det_curve.pyi | 1 - stubs/sklearn/metrics/_plot/regression.pyi | 2 - stubs/sklearn/metrics/_ranking.pyi | 2 - stubs/sklearn/metrics/_scorer.pyi | 3 -- stubs/sklearn/metrics/cluster/_bicluster.pyi | 1 - stubs/sklearn/metrics/cluster/_supervised.pyi | 3 -- .../sklearn/metrics/cluster/_unsupervised.pyi | 2 - stubs/sklearn/metrics/cluster/setup.pyi | 4 -- stubs/sklearn/metrics/pairwise.pyi | 6 +-- stubs/sklearn/metrics/setup.pyi | 4 -- stubs/sklearn/mixture/_base.pyi | 2 - stubs/sklearn/mixture/_bayesian_mixture.pyi | 2 - stubs/sklearn/mixture/_gaussian_mixture.pyi | 1 - stubs/sklearn/model_selection/_plot.pyi | 1 - stubs/sklearn/model_selection/_search.pyi | 5 --- .../_search_successive_halving.pyi | 1 - stubs/sklearn/model_selection/_split.pyi | 3 -- stubs/sklearn/model_selection/_validation.pyi | 5 --- stubs/sklearn/multiclass.pyi | 5 --- stubs/sklearn/multioutput.pyi | 2 - stubs/sklearn/naive_bayes.pyi | 4 +- stubs/sklearn/neighbors/_ball_tree.pyi | 1 - stubs/sklearn/neighbors/_base.pyi | 4 -- stubs/sklearn/neighbors/_classification.pyi | 2 - stubs/sklearn/neighbors/_distance_metric.pyi | 1 - stubs/sklearn/neighbors/_kde.pyi | 2 - stubs/sklearn/neighbors/_lof.pyi | 2 - stubs/sklearn/neighbors/_nca.pyi | 3 -- stubs/sklearn/neighbors/_nearest_centroid.pyi | 3 -- stubs/sklearn/neighbors/_regression.pyi | 2 - stubs/sklearn/neighbors/setup.pyi | 2 - stubs/sklearn/neural_network/_base.pyi | 3 +- .../neural_network/_multilayer_perceptron.pyi | 5 +-- stubs/sklearn/neural_network/_rbm.pyi | 3 -- .../neural_network/_stochastic_optimizers.pyi | 1 - stubs/sklearn/pipeline.pyi | 1 - stubs/sklearn/preprocessing/_data.pyi | 2 - .../sklearn/preprocessing/_discretization.pyi | 2 - stubs/sklearn/preprocessing/_encoders.pyi | 4 -- .../preprocessing/_function_transformer.pyi | 2 - stubs/sklearn/preprocessing/_label.pyi | 5 --- stubs/sklearn/preprocessing/_polynomial.pyi | 5 +-- stubs/sklearn/preprocessing/setup.pyi | 2 - stubs/sklearn/random_projection.pyi | 3 -- .../semi_supervised/_label_propagation.pyi | 2 - .../semi_supervised/_self_training.pyi | 2 - stubs/sklearn/setup.pyi | 5 --- stubs/sklearn/svm/_base.pyi | 3 -- stubs/sklearn/svm/_bounds.pyi | 2 - stubs/sklearn/svm/_classes.pyi | 1 - stubs/sklearn/svm/setup.pyi | 5 --- stubs/sklearn/tests/random_seed.pyi | 1 - stubs/sklearn/tree/_classes.pyi | 4 -- stubs/sklearn/tree/_export.pyi | 1 - stubs/sklearn/tree/_reingold_tilford.pyi | 1 - stubs/sklearn/tree/_tree.pyi | 1 - stubs/sklearn/tree/setup.pyi | 4 -- stubs/sklearn/utils/__init__.pyi | 1 - stubs/sklearn/utils/_array_api.pyi | 2 - stubs/sklearn/utils/_encode.pyi | 1 - stubs/sklearn/utils/_estimator_html_repr.pyi | 1 - stubs/sklearn/utils/_joblib.pyi | 1 - stubs/sklearn/utils/_mask.pyi | 3 -- stubs/sklearn/utils/_mocking.pyi | 1 - stubs/sklearn/utils/_param_validation.pyi | 6 --- stubs/sklearn/utils/_pprint.pyi | 3 +- stubs/sklearn/utils/_show_versions.pyi | 2 - stubs/sklearn/utils/_tags.pyi | 1 - stubs/sklearn/utils/_testing.pyi | 16 -------- stubs/sklearn/utils/class_weight.pyi | 1 - stubs/sklearn/utils/deprecation.pyi | 2 - stubs/sklearn/utils/discovery.pyi | 2 - stubs/sklearn/utils/estimator_checks.pyi | 6 --- stubs/sklearn/utils/extmath.pyi | 2 - stubs/sklearn/utils/graph.pyi | 1 - stubs/sklearn/utils/metaestimators.pyi | 3 -- stubs/sklearn/utils/multiclass.pyi | 2 - stubs/sklearn/utils/optimize.pyi | 2 - stubs/sklearn/utils/parallel.pyi | 2 - stubs/sklearn/utils/random.pyi | 3 -- stubs/sklearn/utils/setup.pyi | 5 --- stubs/sklearn/utils/sparsefuncs.pyi | 7 ---- stubs/sklearn/utils/stats.pyi | 1 - stubs/sklearn/utils/validation.pyi | 7 ---- stubs/sympy-stubs/__init__.pyi | 2 - stubs/sympy-stubs/core/multidimensional.pyi | 2 +- stubs/sympy-stubs/discrete/convolutions.pyi | 2 - .../sympy-stubs/functions/special/bessel.pyi | 4 +- stubs/sympy-stubs/integrals/laplace.pyi | 3 +- .../sympy-stubs/integrals/manualintegrate.pyi | 1 - .../sympy-stubs/multipledispatch/conflict.pyi | 2 +- stubs/sympy-stubs/ntheory/generate.pyi | 2 - stubs/sympy-stubs/ntheory/partitions_.pyi | 2 - stubs/sympy-stubs/ntheory/residue_ntheory.pyi | 2 - stubs/sympy-stubs/physics/matrices.pyi | 1 - .../plotting/pygletplot/__init__.pyi | 1 - stubs/sympy-stubs/polys/domains/__init__.pyi | 7 ---- .../polys/domains/characteristiczero.pyi | 1 - .../polys/domains/expressiondomain.pyi | 1 - .../polys/domains/fractionfield.pyi | 1 - .../polys/domains/gmpyintegerring.pyi | 1 - .../polys/domains/gmpyrationalfield.pyi | 1 - .../sympy-stubs/polys/domains/integerring.pyi | 1 - .../polys/domains/polynomialring.pyi | 1 - .../polys/domains/pythonintegerring.pyi | 1 - .../polys/domains/pythonrationalfield.pyi | 1 - .../polys/domains/quotientring.pyi | 1 - stubs/sympy-stubs/polys/factortools.pyi | 2 - stubs/sympy-stubs/polys/polyclasses.pyi | 2 - stubs/sympy-stubs/series/__init__.pyi | 1 - stubs/sympy-stubs/sets/__init__.pyi | 2 - stubs/sympy-stubs/solvers/__init__.pyi | 1 - stubs/sympy-stubs/stats/rv_interface.pyi | 4 -- stubs/sympy-stubs/strategies/tree.pyi | 2 +- stubs/sympy-stubs/utilities/decorator.pyi | 1 - stubs/sympy-stubs/utilities/iterables.pyi | 1 - .../sympy-stubs/utilities/mathml/__init__.pyi | 1 - stubs/vispy/app/_default_app.pyi | 1 - stubs/vispy/app/application.pyi | 6 --- stubs/vispy/app/base.pyi | 3 -- stubs/vispy/app/canvas.pyi | 13 ++----- stubs/vispy/color/color_array.pyi | 5 --- stubs/vispy/color/color_space.pyi | 1 - stubs/vispy/color/colormap.pyi | 5 --- stubs/vispy/ext/cocoapy.pyi | 39 ------------------- stubs/vispy/ext/cubehelix.pyi | 2 - stubs/vispy/geometry/calculations.pyi | 1 - stubs/vispy/geometry/curves.pyi | 2 - stubs/vispy/geometry/generation.pyi | 1 - stubs/vispy/geometry/isocurve.pyi | 1 - stubs/vispy/geometry/isosurface.pyi | 1 - stubs/vispy/geometry/meshdata.pyi | 1 - stubs/vispy/geometry/normals.pyi | 1 - stubs/vispy/geometry/parametric.pyi | 2 - stubs/vispy/geometry/polygon.pyi | 3 -- stubs/vispy/geometry/rect.pyi | 1 - stubs/vispy/geometry/torusknot.pyi | 4 -- stubs/vispy/geometry/triangulation.pyi | 3 -- stubs/vispy/gloo/buffer.pyi | 5 --- stubs/vispy/gloo/context.pyi | 4 -- stubs/vispy/gloo/framebuffer.pyi | 3 -- stubs/vispy/gloo/gl/_gl2.pyi | 2 - stubs/vispy/gloo/gl/_pyopengl2.pyi | 1 - stubs/vispy/gloo/gl/dummy.pyi | 2 +- stubs/vispy/gloo/gl/gl2.pyi | 5 --- stubs/vispy/gloo/gl/glplus.pyi | 1 - stubs/vispy/gloo/gl/pyopengl2.pyi | 2 - stubs/vispy/gloo/glir.pyi | 9 ----- stubs/vispy/gloo/globject.pyi | 1 - stubs/vispy/gloo/preprocessor.pyi | 3 -- stubs/vispy/gloo/program.pyi | 9 +---- stubs/vispy/gloo/texture.pyi | 5 +-- stubs/vispy/gloo/util.pyi | 1 - stubs/vispy/gloo/wrappers.pyi | 6 --- stubs/vispy/glsl/__init__.pyi | 1 - stubs/vispy/glsl/build_spatial_filters.pyi | 4 -- stubs/vispy/io/__init__.pyi | 1 - stubs/vispy/io/datasets.pyi | 2 - stubs/vispy/io/image.pyi | 2 - stubs/vispy/io/mesh.pyi | 5 --- stubs/vispy/io/stl.pyi | 2 - stubs/vispy/io/wavefront.pyi | 7 ---- stubs/vispy/plot/fig.pyi | 1 - stubs/vispy/plot/plotwidget.pyi | 1 - stubs/vispy/scene/cameras/_base.pyi | 6 --- stubs/vispy/scene/cameras/arcball.pyi | 5 --- stubs/vispy/scene/cameras/base_camera.pyi | 2 - stubs/vispy/scene/cameras/fly.pyi | 4 -- stubs/vispy/scene/cameras/magnify.pyi | 2 - stubs/vispy/scene/cameras/panzoom.pyi | 2 - stubs/vispy/scene/cameras/perspective.pyi | 4 -- stubs/vispy/scene/cameras/turntable.pyi | 3 -- stubs/vispy/scene/canvas.pyi | 11 +----- stubs/vispy/scene/node.pyi | 5 +-- stubs/vispy/scene/visuals.pyi | 5 +-- stubs/vispy/scene/widgets/axis.pyi | 2 - stubs/vispy/scene/widgets/colorbar.pyi | 3 -- stubs/vispy/scene/widgets/console.pyi | 2 - stubs/vispy/scene/widgets/grid.pyi | 3 -- stubs/vispy/scene/widgets/label.pyi | 1 - stubs/vispy/scene/widgets/viewbox.pyi | 5 +-- stubs/vispy/scene/widgets/widget.pyi | 7 ---- stubs/vispy/testing/_runners.pyi | 10 +---- stubs/vispy/testing/_testing.pyi | 11 ------ stubs/vispy/testing/image_tester.pyi | 15 +------ stubs/vispy/testing/rendered_array_tester.pyi | 3 +- stubs/vispy/util/check_environment.pyi | 2 - stubs/vispy/util/config.pyi | 17 +------- stubs/vispy/util/eq.pyi | 1 - stubs/vispy/util/event.pyi | 6 --- stubs/vispy/util/fetching.pyi | 10 +---- stubs/vispy/util/filter.pyi | 1 - stubs/vispy/util/fonts/_quartz.pyi | 21 ---------- stubs/vispy/util/fonts/_triage.pyi | 3 -- stubs/vispy/util/fonts/_vispy_fonts.pyi | 1 - stubs/vispy/util/fourier.pyi | 1 - stubs/vispy/util/logs.pyi | 9 ----- stubs/vispy/util/osmesa_gl.pyi | 2 - stubs/vispy/util/profiler.pyi | 3 -- stubs/vispy/util/ptime.pyi | 1 - stubs/vispy/util/quaternion.pyi | 1 - stubs/vispy/util/svg/color.pyi | 2 - stubs/vispy/util/svg/element.pyi | 2 - stubs/vispy/util/svg/geometry.pyi | 1 - stubs/vispy/util/svg/group.pyi | 4 -- stubs/vispy/util/svg/length.pyi | 4 -- stubs/vispy/util/svg/path.pyi | 5 --- stubs/vispy/util/svg/style.pyi | 3 -- stubs/vispy/util/svg/svg.pyi | 1 - stubs/vispy/util/svg/transform.pyi | 3 -- stubs/vispy/util/svg/transformable.pyi | 1 - stubs/vispy/util/svg/viewport.pyi | 1 - stubs/vispy/util/transforms.pyi | 2 - stubs/vispy/util/wrappers.pyi | 1 - stubs/vispy/visuals/_scalable_textures.pyi | 2 - stubs/vispy/visuals/axis.pyi | 4 -- stubs/vispy/visuals/border.pyi | 1 - stubs/vispy/visuals/box.pyi | 2 - .../collections/agg_fast_path_collection.pyi | 3 -- .../collections/agg_path_collection.pyi | 3 -- .../collections/agg_point_collection.pyi | 1 - .../collections/agg_segment_collection.pyi | 3 -- .../visuals/collections/base_collection.pyi | 5 --- .../vispy/visuals/collections/collection.pyi | 5 --- .../visuals/collections/path_collection.pyi | 3 -- .../visuals/collections/point_collection.pyi | 2 - .../collections/polygon_collection.pyi | 1 - .../collections/raw_path_collection.pyi | 3 -- .../collections/raw_point_collection.pyi | 3 -- .../collections/raw_polygon_collection.pyi | 4 -- .../collections/raw_segment_collection.pyi | 3 -- .../collections/raw_triangle_collection.pyi | 3 -- .../collections/segment_collection.pyi | 2 - .../collections/triangle_collection.pyi | 1 - stubs/vispy/visuals/collections/util.pyi | 3 -- stubs/vispy/visuals/colorbar.pyi | 6 +-- stubs/vispy/visuals/cube.pyi | 1 - stubs/vispy/visuals/ellipse.pyi | 1 - stubs/vispy/visuals/filters/base_filter.pyi | 2 - stubs/vispy/visuals/filters/clipper.pyi | 2 - .../vispy/visuals/filters/clipping_planes.pyi | 1 - stubs/vispy/visuals/filters/color.pyi | 2 - stubs/vispy/visuals/filters/mesh.pyi | 2 - stubs/vispy/visuals/filters/picking.pyi | 1 - stubs/vispy/visuals/graphs/graph.pyi | 3 -- .../vispy/visuals/graphs/layouts/circular.pyi | 1 - .../visuals/graphs/layouts/force_directed.pyi | 3 -- .../graphs/layouts/networkx_layout.pyi | 1 - stubs/vispy/visuals/graphs/layouts/random.pyi | 3 -- stubs/vispy/visuals/graphs/util.pyi | 1 - stubs/vispy/visuals/gridlines.pyi | 1 - stubs/vispy/visuals/gridmesh.pyi | 1 - stubs/vispy/visuals/histogram.pyi | 1 - stubs/vispy/visuals/image.pyi | 9 +---- stubs/vispy/visuals/image_complex.pyi | 4 +- stubs/vispy/visuals/infinite_line.pyi | 2 - stubs/vispy/visuals/isocurve.pyi | 3 -- stubs/vispy/visuals/isoline.pyi | 3 -- stubs/vispy/visuals/isosurface.pyi | 1 - stubs/vispy/visuals/line/arrow.pyi | 3 -- stubs/vispy/visuals/line/dash_atlas.pyi | 1 - stubs/vispy/visuals/line/line.pyi | 7 +--- stubs/vispy/visuals/line_plot.pyi | 3 -- stubs/vispy/visuals/linear_region.pyi | 2 - stubs/vispy/visuals/markers.pyi | 4 -- stubs/vispy/visuals/mesh.pyi | 7 +--- stubs/vispy/visuals/mesh_normals.pyi | 1 - stubs/vispy/visuals/plane.pyi | 2 - stubs/vispy/visuals/polygon.pyi | 5 --- stubs/vispy/visuals/rectangle.pyi | 1 - stubs/vispy/visuals/scrolling_lines.pyi | 2 - stubs/vispy/visuals/shaders/compiler.pyi | 2 - stubs/vispy/visuals/shaders/function.pyi | 9 ----- stubs/vispy/visuals/shaders/multiprogram.pyi | 2 - stubs/vispy/visuals/shaders/parsing.pyi | 2 - stubs/vispy/visuals/shaders/program.pyi | 9 ----- stubs/vispy/visuals/shaders/shader_object.pyi | 3 -- stubs/vispy/visuals/shaders/variable.pyi | 2 - stubs/vispy/visuals/spectrogram.pyi | 2 - stubs/vispy/visuals/sphere.pyi | 2 - stubs/vispy/visuals/surface_plot.pyi | 2 - stubs/vispy/visuals/text/_sdf_gpu.pyi | 1 - stubs/vispy/visuals/text/text.pyi | 8 ---- stubs/vispy/visuals/transforms/_util.pyi | 5 --- .../visuals/transforms/base_transform.pyi | 3 -- stubs/vispy/visuals/transforms/chain.pyi | 2 - .../vispy/visuals/transforms/interactive.pyi | 1 - stubs/vispy/visuals/transforms/linear.pyi | 5 +-- stubs/vispy/visuals/transforms/nonlinear.pyi | 4 +- .../visuals/transforms/transform_system.pyi | 6 --- stubs/vispy/visuals/tube.pyi | 4 -- stubs/vispy/visuals/visual.pyi | 9 +---- stubs/vispy/visuals/volume.pyi | 6 --- stubs/vispy/visuals/windbarb.pyi | 1 - stubs/vispy/visuals/xyz_axis.pyi | 1 - 747 files changed, 126 insertions(+), 2158 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index acc72295..6c6c75c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,8 +27,36 @@ line-length = 130 target-version = "py39" [tool.ruff.lint] -select = [ +extend-select = [ + "FA", # flake8-future-annotations "I", # isort + "W", # pycodestyle Warning +] +ignore= [ + ### + # Rules we don't want or don't agree with + ### + # Used for direct, non-subclass type comparison, for example: `type(val) is str` + # see https://github.com/astral-sh/ruff/issues/6465 + "E721", # Do not compare types, use `isinstance()` + + # TODO: Investigate and fix or configure + "E402", + "E722", + "E743", + "F811", + "F822", + "F841", + "F842", +] +[tool.ruff.lint.per-file-ignores] +"*.pyi" = [ + # Rules that are out of the control of stub authors: + "E741", # ambiguous variable name + "F403", # `from . import *` used; unable to detect undefined names + # Stubs can sometimes re-export entire modules. + # Issues with using a star-imported name will be caught by type-checkers. + "F405", # may be undefined, or defined from star imports ] [tool.ruff.lint.isort] diff --git a/stubs/matplotlib/__init__.pyi b/stubs/matplotlib/__init__.pyi index f62904be..42e7d9ba 100644 --- a/stubs/matplotlib/__init__.pyi +++ b/stubs/matplotlib/__init__.pyi @@ -1,10 +1,7 @@ import contextlib from typing import Generator, Literal -import numpy as np -from packaging.version import parse as parse_version - -from . import _docstring, _version, cbook, colors as colors, rcsetup +from . import colors as colors from ._typing import * class __getattr__: diff --git a/stubs/matplotlib/_afm.pyi b/stubs/matplotlib/_afm.pyi index 68c75d48..106f0a91 100644 --- a/stubs/matplotlib/_afm.pyi +++ b/stubs/matplotlib/_afm.pyi @@ -1,4 +1,3 @@ -import numpy as np from ._typing import * diff --git a/stubs/matplotlib/_api/__init__.pyi b/stubs/matplotlib/_api/__init__.pyi index 9d20e293..e6e1e2c1 100644 --- a/stubs/matplotlib/_api/__init__.pyi +++ b/stubs/matplotlib/_api/__init__.pyi @@ -1,5 +1,5 @@ import functools -from typing import Any, Callable, Generator, Iterable, Type +from typing import Callable, Generator, Iterable, Type from .deprecation import MatplotlibDeprecationWarning diff --git a/stubs/matplotlib/_mathtext.pyi b/stubs/matplotlib/_mathtext.pyi index 6ef81f3d..3019a73a 100644 --- a/stubs/matplotlib/_mathtext.pyi +++ b/stubs/matplotlib/_mathtext.pyi @@ -1,6 +1,5 @@ import enum import functools -from sre_parse import State from tkinter.tix import HList from typing import Literal diff --git a/stubs/matplotlib/_pylab_helpers.pyi b/stubs/matplotlib/_pylab_helpers.pyi index 73d0b974..66fbb3d3 100644 --- a/stubs/matplotlib/_pylab_helpers.pyi +++ b/stubs/matplotlib/_pylab_helpers.pyi @@ -1,4 +1,4 @@ -from typing import Any, List, OrderedDict +from typing import OrderedDict from .backend_bases import FigureManagerBase from .figure import Figure diff --git a/stubs/matplotlib/animation.pyi b/stubs/matplotlib/animation.pyi index 18869545..3bdbb9d5 100644 --- a/stubs/matplotlib/animation.pyi +++ b/stubs/matplotlib/animation.pyi @@ -1,9 +1,7 @@ import abc import contextlib from itertools import count -from typing import Callable, Generator, Iterable, Iterator, List - -from matplotlib.backend_bases import NonGuiException +from typing import Callable, Generator, Iterable, Iterator from .figure import Figure diff --git a/stubs/matplotlib/axes/_axes.pyi b/stubs/matplotlib/axes/_axes.pyi index d88ef0c9..4bf1fc6a 100644 --- a/stubs/matplotlib/axes/_axes.pyi +++ b/stubs/matplotlib/axes/_axes.pyi @@ -1,5 +1,4 @@ import datetime -from re import L from typing import Callable, Literal, Sequence, overload import matplotlib.tri as mtri diff --git a/stubs/matplotlib/axes/_secondary_axes.pyi b/stubs/matplotlib/axes/_secondary_axes.pyi index a53a232c..29f57013 100644 --- a/stubs/matplotlib/axes/_secondary_axes.pyi +++ b/stubs/matplotlib/axes/_secondary_axes.pyi @@ -1,6 +1,5 @@ from typing import Callable, Literal -import numpy as np from matplotlib._typing import * from matplotlib.axes._base import _AxesBase from matplotlib.transforms import Transform diff --git a/stubs/matplotlib/axis.pyi b/stubs/matplotlib/axis.pyi index 5202a0f7..65a9b090 100644 --- a/stubs/matplotlib/axis.pyi +++ b/stubs/matplotlib/axis.pyi @@ -1,5 +1,4 @@ import datetime -from datetime import timezone from typing import Any, Callable, Literal, Type import numpy as np diff --git a/stubs/matplotlib/backends/backend_agg.pyi b/stubs/matplotlib/backends/backend_agg.pyi index 07f60b98..ab0b83fc 100644 --- a/stubs/matplotlib/backends/backend_agg.pyi +++ b/stubs/matplotlib/backends/backend_agg.pyi @@ -1,6 +1,6 @@ import threading from io import BufferedWriter, BytesIO -from typing import Any, Tuple +from typing import Any import numpy as np from matplotlib._typing import * diff --git a/stubs/matplotlib/backends/backend_pdf.pyi b/stubs/matplotlib/backends/backend_pdf.pyi index c614b640..b0c31345 100644 --- a/stubs/matplotlib/backends/backend_pdf.pyi +++ b/stubs/matplotlib/backends/backend_pdf.pyi @@ -1,7 +1,7 @@ from enum import Enum from functools import total_ordering from io import BytesIO -from typing import Any, Callable, Optional, Set +from typing import Any, Optional, Set import numpy as np from matplotlib._enums import CapStyle, JoinStyle diff --git a/stubs/matplotlib/backends/backend_pgf.pyi b/stubs/matplotlib/backends/backend_pgf.pyi index 43e4bcfc..b4a0a83d 100644 --- a/stubs/matplotlib/backends/backend_pgf.pyi +++ b/stubs/matplotlib/backends/backend_pgf.pyi @@ -1,7 +1,5 @@ from typing import Any, Callable -import numpy as np -from matplotlib import _api from matplotlib._typing import * from matplotlib.backend_bases import FigureCanvasBase, FigureManagerBase, GraphicsContextBase, RendererBase, _Backend from matplotlib.figure import Figure diff --git a/stubs/matplotlib/category.pyi b/stubs/matplotlib/category.pyi index 1fe30a40..ae9f9b08 100644 --- a/stubs/matplotlib/category.pyi +++ b/stubs/matplotlib/category.pyi @@ -1,4 +1,4 @@ -from typing import Any, Iterable +from typing import Iterable import numpy as np diff --git a/stubs/matplotlib/collections.pyi b/stubs/matplotlib/collections.pyi index d5283100..fafb7f7d 100644 --- a/stubs/matplotlib/collections.pyi +++ b/stubs/matplotlib/collections.pyi @@ -1,4 +1,3 @@ -from tkinter.messagebox import NO from typing import Callable, Literal, Sequence import numpy as np diff --git a/stubs/matplotlib/figure.pyi b/stubs/matplotlib/figure.pyi index 4544cd09..7addcfd3 100644 --- a/stubs/matplotlib/figure.pyi +++ b/stubs/matplotlib/figure.pyi @@ -5,7 +5,7 @@ import numpy as np from mpl_toolkits.mplot3d import Axes3D from ._typing import * -from .artist import Artist, _finalize_rasterization, allow_rasterization +from .artist import Artist, allow_rasterization from .axes import Axes from .backend_bases import FigureCanvasBase, MouseButton, MouseEvent, RendererBase from .colorbar import Colorbar diff --git a/stubs/matplotlib/offsetbox.pyi b/stubs/matplotlib/offsetbox.pyi index 1050ff02..1cade639 100644 --- a/stubs/matplotlib/offsetbox.pyi +++ b/stubs/matplotlib/offsetbox.pyi @@ -1,4 +1,4 @@ -from typing import Any, Callable, Literal, Sequence +from typing import Callable, Literal, Sequence from ._typing import * from .artist import Artist diff --git a/stubs/matplotlib/pyplot.pyi b/stubs/matplotlib/pyplot.pyi index 20db5b64..fd3d3b42 100644 --- a/stubs/matplotlib/pyplot.pyi +++ b/stubs/matplotlib/pyplot.pyi @@ -1,18 +1,14 @@ import datetime -from array import array from typing import Callable, ContextManager, Literal, Sequence, overload -import matplotlib -import matplotlib.image import numpy as np from matplotlib import rcParams as rcParams, style as style from matplotlib.contour import QuadContourSet -from . import rcParams from ._typing import * from .artist import Artist from .axes import Axes as Axes -from .backend_bases import FigureCanvasBase, FigureManagerBase, MouseButton, _Backend +from .backend_bases import FigureManagerBase, MouseButton, _Backend from .collections import BrokenBarHCollection, Collection, LineCollection, PathCollection, PolyCollection, QuadMesh from .colors import Colormap, Normalize from .container import BarContainer, ErrorbarContainer, StemContainer @@ -23,7 +19,6 @@ from .lines import Line2D from .markers import MarkerStyle from .patches import FancyArrow, Polygon from .quiver import Quiver -from .rcsetup import interactive_bk as _interactive_bk from .scale import ScaleBase from .streamplot import StreamplotSet from .table import Table diff --git a/stubs/matplotlib/quiver.pyi b/stubs/matplotlib/quiver.pyi index ca3c55da..62ea5b98 100644 --- a/stubs/matplotlib/quiver.pyi +++ b/stubs/matplotlib/quiver.pyi @@ -3,7 +3,7 @@ from typing import Literal from ._typing import * from .artist import Artist, allow_rasterization from .axes import Axes -from .backend_bases import Event, MouseEvent, RendererBase +from .backend_bases import MouseEvent, RendererBase from .collections import PolyCollection from .figure import Figure diff --git a/stubs/matplotlib/scale.pyi b/stubs/matplotlib/scale.pyi index 812b68d2..3903ffc0 100644 --- a/stubs/matplotlib/scale.pyi +++ b/stubs/matplotlib/scale.pyi @@ -1,4 +1,4 @@ -from typing import Any, Callable, Literal, Sequence +from typing import Callable, Literal, Sequence from ._typing import * from .axis import Axis diff --git a/stubs/matplotlib/spines.pyi b/stubs/matplotlib/spines.pyi index 0b15f581..08b552d6 100644 --- a/stubs/matplotlib/spines.pyi +++ b/stubs/matplotlib/spines.pyi @@ -6,7 +6,7 @@ from typing import Sequence from ._typing import * from .artist import allow_rasterization from .axes import Axes -from .axis import Axis, XAxis, YAxis +from .axis import Axis from .backend_bases import RendererBase from .patches import Patch from .path import Path diff --git a/stubs/matplotlib/ticker.pyi b/stubs/matplotlib/ticker.pyi index 2ad53b7a..099f64ff 100644 --- a/stubs/matplotlib/ticker.pyi +++ b/stubs/matplotlib/ticker.pyi @@ -1,5 +1,5 @@ from functools import partial -from typing import Any, Callable, Literal, Sequence +from typing import Callable, Literal, Sequence from ._typing import * from .axis import Axis diff --git a/stubs/matplotlib/widgets.pyi b/stubs/matplotlib/widgets.pyi index 709f2bc7..a882f5f4 100644 --- a/stubs/matplotlib/widgets.pyi +++ b/stubs/matplotlib/widgets.pyi @@ -1,26 +1,19 @@ -import copy -from contextlib import ExitStack -from numbers import Integral, Number -from typing import Any, Callable, Dict, List, Literal, Mapping, Optional, Sequence, Tuple, Union +from typing import Callable, Literal, Mapping, Sequence -import matplotlib as mpl import numpy as np from matplotlib.axes._axes import Axes from matplotlib.backend_bases import DrawEvent, Event, FigureCanvasBase, KeyEvent, MouseButton, MouseEvent from matplotlib.figure import Figure from matplotlib.lines import Line2D -from matplotlib.patches import Ellipse, Rectangle -from matplotlib.transforms import Affine2D -from numpy import float64, ndarray +from numpy import ndarray from numpy.typing import ArrayLike from PIL.Image import Image from ._typing import Color from .artist import Artist from .lines import Line2D -from .patches import Circle, Ellipse, Polygon, Rectangle +from .patches import Circle from .text import Text -from .transforms import Affine2D, TransformedPatchPath class LockDraw: def __init__(self) -> None: ... diff --git a/stubs/networkx/__init__.pyi b/stubs/networkx/__init__.pyi index 901f9d56..4db2455f 100644 --- a/stubs/networkx/__init__.pyi +++ b/stubs/networkx/__init__.pyi @@ -63,4 +63,3 @@ from .generators import * from .linalg import * from .readwrite import * from .relabel import convert_node_labels_to_integers as convert_node_labels_to_integers, relabel_nodes as relabel_nodes -from .testing.test import run as test diff --git a/stubs/networkx/algorithms/approximation/clique.pyi b/stubs/networkx/algorithms/approximation/clique.pyi index 1bf58945..3ebc3dc2 100644 --- a/stubs/networkx/algorithms/approximation/clique.pyi +++ b/stubs/networkx/algorithms/approximation/clique.pyi @@ -1,5 +1,4 @@ from ...classes.graph import Graph -from ...utils import not_implemented_for __all__ = [ "clique_removal", diff --git a/stubs/networkx/algorithms/approximation/clustering_coefficient.pyi b/stubs/networkx/algorithms/approximation/clustering_coefficient.pyi index 099da4d3..6de1695e 100644 --- a/stubs/networkx/algorithms/approximation/clustering_coefficient.pyi +++ b/stubs/networkx/algorithms/approximation/clustering_coefficient.pyi @@ -1,5 +1,5 @@ from ...classes.graph import Graph -from ...utils import not_implemented_for, py_random_state +from ...utils import py_random_state __all__ = ["average_clustering"] diff --git a/stubs/networkx/algorithms/approximation/connectivity.pyi b/stubs/networkx/algorithms/approximation/connectivity.pyi index 869aa72b..b3d8f17f 100644 --- a/stubs/networkx/algorithms/approximation/connectivity.pyi +++ b/stubs/networkx/algorithms/approximation/connectivity.pyi @@ -1,5 +1,3 @@ -import itertools -from operator import itemgetter from typing import Mapping from ...classes.graph import Graph diff --git a/stubs/networkx/algorithms/approximation/dominating_set.pyi b/stubs/networkx/algorithms/approximation/dominating_set.pyi index 76731cc2..18b053dc 100644 --- a/stubs/networkx/algorithms/approximation/dominating_set.pyi +++ b/stubs/networkx/algorithms/approximation/dominating_set.pyi @@ -1,6 +1,4 @@ from ...classes.graph import Graph -from ...utils import not_implemented_for -from ..matching import maximal_matching __all__ = ["min_weighted_dominating_set", "min_edge_dominating_set"] diff --git a/stubs/networkx/algorithms/approximation/kcomponents.pyi b/stubs/networkx/algorithms/approximation/kcomponents.pyi index 4d3d56b3..d64c4076 100644 --- a/stubs/networkx/algorithms/approximation/kcomponents.pyi +++ b/stubs/networkx/algorithms/approximation/kcomponents.pyi @@ -1,13 +1,8 @@ -import itertools -from collections import defaultdict from collections.abc import Mapping from functools import cached_property from typing import Mapping from ...classes.graph import Graph -from ...exception import NetworkXError -from ...utils import not_implemented_for -from . import local_node_connectivity __all__ = ["k_components"] diff --git a/stubs/networkx/algorithms/approximation/maxcut.pyi b/stubs/networkx/algorithms/approximation/maxcut.pyi index 5f488f27..6d414481 100644 --- a/stubs/networkx/algorithms/approximation/maxcut.pyi +++ b/stubs/networkx/algorithms/approximation/maxcut.pyi @@ -2,7 +2,7 @@ from typing import Any from ..._typing import Scalar from ...classes.graph import Graph -from ...utils.decorators import not_implemented_for, py_random_state +from ...utils.decorators import py_random_state __all__ = ["randomized_partitioning", "one_exchange"] diff --git a/stubs/networkx/algorithms/approximation/ramsey.pyi b/stubs/networkx/algorithms/approximation/ramsey.pyi index 0d2bfb92..afecf720 100644 --- a/stubs/networkx/algorithms/approximation/ramsey.pyi +++ b/stubs/networkx/algorithms/approximation/ramsey.pyi @@ -1,5 +1,4 @@ from ...classes.graph import Graph -from ...utils import arbitrary_element, not_implemented_for __all__ = ["ramsey_R2"] diff --git a/stubs/networkx/algorithms/approximation/steinertree.pyi b/stubs/networkx/algorithms/approximation/steinertree.pyi index 90dfc960..f90c3674 100644 --- a/stubs/networkx/algorithms/approximation/steinertree.pyi +++ b/stubs/networkx/algorithms/approximation/steinertree.pyi @@ -1,9 +1,7 @@ -from itertools import chain from numpy.typing import ArrayLike from ...classes.graph import Graph -from ...utils import not_implemented_for, pairwise __all__ = ["metric_closure", "steiner_tree"] diff --git a/stubs/networkx/algorithms/approximation/traveling_salesman.pyi b/stubs/networkx/algorithms/approximation/traveling_salesman.pyi index e7cff9dc..5011e6cc 100644 --- a/stubs/networkx/algorithms/approximation/traveling_salesman.pyi +++ b/stubs/networkx/algorithms/approximation/traveling_salesman.pyi @@ -1,11 +1,9 @@ -import math from typing import Literal, Mapping from numpy.typing import ArrayLike -from ...algorithms.tree.mst import random_spanning_tree from ...classes.graph import Graph -from ...utils import not_implemented_for, pairwise, py_random_state +from ...utils import py_random_state __all__ = [ "traveling_salesman_problem", diff --git a/stubs/networkx/algorithms/approximation/treewidth.pyi b/stubs/networkx/algorithms/approximation/treewidth.pyi index a9eb41d5..73610b93 100644 --- a/stubs/networkx/algorithms/approximation/treewidth.pyi +++ b/stubs/networkx/algorithms/approximation/treewidth.pyi @@ -1,9 +1,5 @@ -import itertools -import sys -from heapq import heapify, heappop, heappush from ...classes.graph import Graph -from ...utils import not_implemented_for __all__ = ["treewidth_min_degree", "treewidth_min_fill_in"] diff --git a/stubs/networkx/algorithms/assortativity/connectivity.pyi b/stubs/networkx/algorithms/assortativity/connectivity.pyi index 03c8f350..a1a2f983 100644 --- a/stubs/networkx/algorithms/assortativity/connectivity.pyi +++ b/stubs/networkx/algorithms/assortativity/connectivity.pyi @@ -1,4 +1,3 @@ -from collections import defaultdict from typing import Literal, Mapping from ...classes.graph import Graph diff --git a/stubs/networkx/algorithms/assortativity/correlation.pyi b/stubs/networkx/algorithms/assortativity/correlation.pyi index ada1eb16..a3727eeb 100644 --- a/stubs/networkx/algorithms/assortativity/correlation.pyi +++ b/stubs/networkx/algorithms/assortativity/correlation.pyi @@ -1,6 +1,4 @@ from ...classes.graph import Graph -from .mixing import attribute_mixing_matrix, degree_mixing_matrix -from .pairs import node_degree_xy __all__ = [ "degree_pearson_correlation_coefficient", diff --git a/stubs/networkx/algorithms/assortativity/mixing.pyi b/stubs/networkx/algorithms/assortativity/mixing.pyi index 6b448adb..910b4fd8 100644 --- a/stubs/networkx/algorithms/assortativity/mixing.pyi +++ b/stubs/networkx/algorithms/assortativity/mixing.pyi @@ -1,8 +1,6 @@ from typing import Mapping from ...classes.graph import Graph -from ...utils import dict_to_numpy_array -from .pairs import node_attribute_xy, node_degree_xy __all__ = [ "attribute_mixing_matrix", diff --git a/stubs/networkx/algorithms/asteroidal.pyi b/stubs/networkx/algorithms/asteroidal.pyi index 6b340671..ffe7ad0e 100644 --- a/stubs/networkx/algorithms/asteroidal.pyi +++ b/stubs/networkx/algorithms/asteroidal.pyi @@ -1,7 +1,6 @@ from typing import Mapping from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = ["is_at_free", "find_asteroidal_triple"] diff --git a/stubs/networkx/algorithms/bipartite/basic.pyi b/stubs/networkx/algorithms/bipartite/basic.pyi index 0f0fe823..4c519ab1 100644 --- a/stubs/networkx/algorithms/bipartite/basic.pyi +++ b/stubs/networkx/algorithms/bipartite/basic.pyi @@ -1,8 +1,6 @@ from typing import Mapping -from ...algorithms.components import connected_components from ...classes.graph import Graph -from ...exception import AmbiguousSolution __all__ = [ "is_bipartite", diff --git a/stubs/networkx/algorithms/bipartite/cluster.pyi b/stubs/networkx/algorithms/bipartite/cluster.pyi index 639c6a5b..0e929fff 100644 --- a/stubs/networkx/algorithms/bipartite/cluster.pyi +++ b/stubs/networkx/algorithms/bipartite/cluster.pyi @@ -1,4 +1,3 @@ -import itertools from collections.abc import Iterable from typing import Mapping diff --git a/stubs/networkx/algorithms/bipartite/covering.pyi b/stubs/networkx/algorithms/bipartite/covering.pyi index 87c16cea..9de8689c 100644 --- a/stubs/networkx/algorithms/bipartite/covering.pyi +++ b/stubs/networkx/algorithms/bipartite/covering.pyi @@ -1,7 +1,4 @@ -from ...algorithms.covering import min_edge_cover as _min_edge_cover from ...classes.graph import Graph -from ...utils import not_implemented_for -from .matching import hopcroft_karp_matching __all__ = ["min_edge_cover"] diff --git a/stubs/networkx/algorithms/bipartite/edgelist.pyi b/stubs/networkx/algorithms/bipartite/edgelist.pyi index 8f28dd06..62e3d393 100644 --- a/stubs/networkx/algorithms/bipartite/edgelist.pyi +++ b/stubs/networkx/algorithms/bipartite/edgelist.pyi @@ -4,7 +4,6 @@ from ...classes.graph import Graph __all__ = ["generate_edgelist", "write_edgelist", "parse_edgelist", "read_edgelist"] -from ...utils import not_implemented_for, open_file def write_edgelist( G: Graph, diff --git a/stubs/networkx/algorithms/bipartite/generators.pyi b/stubs/networkx/algorithms/bipartite/generators.pyi index 26c85621..e3f3163b 100644 --- a/stubs/networkx/algorithms/bipartite/generators.pyi +++ b/stubs/networkx/algorithms/bipartite/generators.pyi @@ -1,11 +1,7 @@ -import math -import numbers -from functools import reduce from numpy.typing import ArrayLike -from ...classes.graph import Graph -from ...utils import nodes_or_number, py_random_state +from ...utils import py_random_state __all__ = [ "configuration_model", diff --git a/stubs/networkx/algorithms/bipartite/matching.pyi b/stubs/networkx/algorithms/bipartite/matching.pyi index bcfdd9ab..534cb9c0 100644 --- a/stubs/networkx/algorithms/bipartite/matching.pyi +++ b/stubs/networkx/algorithms/bipartite/matching.pyi @@ -8,12 +8,9 @@ # Portions of this module use code from David Eppstein's Python Algorithms and # Data Structures (PADS) library, which is dedicated to the public domain (for # proof, see ). -import collections -import itertools from typing import Mapping from ...classes.graph import Graph -from .matrix import biadjacency_matrix __all__ = [ "maximum_matching", diff --git a/stubs/networkx/algorithms/bipartite/matrix.pyi b/stubs/networkx/algorithms/bipartite/matrix.pyi index 3f2f6ad7..9cdea443 100644 --- a/stubs/networkx/algorithms/bipartite/matrix.pyi +++ b/stubs/networkx/algorithms/bipartite/matrix.pyi @@ -1,4 +1,3 @@ -import itertools from numpy.typing import ArrayLike diff --git a/stubs/networkx/algorithms/bipartite/projection.pyi b/stubs/networkx/algorithms/bipartite/projection.pyi index 9c9ac760..953725b3 100644 --- a/stubs/networkx/algorithms/bipartite/projection.pyi +++ b/stubs/networkx/algorithms/bipartite/projection.pyi @@ -2,9 +2,6 @@ from collections.abc import Iterable from numpy.typing import ArrayLike -from ...exception import NetworkXAlgorithmError -from ...utils import not_implemented_for - __all__ = [ "project", "projected_graph", diff --git a/stubs/networkx/algorithms/bipartite/redundancy.pyi b/stubs/networkx/algorithms/bipartite/redundancy.pyi index 11ba3487..6321b9f2 100644 --- a/stubs/networkx/algorithms/bipartite/redundancy.pyi +++ b/stubs/networkx/algorithms/bipartite/redundancy.pyi @@ -1,8 +1,5 @@ -from itertools import combinations from typing import Mapping -from networkx import NetworkXError - from ...classes.graph import Graph __all__ = ["node_redundancy"] diff --git a/stubs/networkx/algorithms/boundary.pyi b/stubs/networkx/algorithms/boundary.pyi index ed7e4567..aa515e2e 100644 --- a/stubs/networkx/algorithms/boundary.pyi +++ b/stubs/networkx/algorithms/boundary.pyi @@ -1,5 +1,4 @@ from collections.abc import Iterable -from itertools import chain from typing import Any from ..classes.graph import Graph diff --git a/stubs/networkx/algorithms/bridges.pyi b/stubs/networkx/algorithms/bridges.pyi index 8b706918..1421911b 100644 --- a/stubs/networkx/algorithms/bridges.pyi +++ b/stubs/networkx/algorithms/bridges.pyi @@ -1,7 +1,5 @@ -from itertools import chain from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = ["bridges", "has_bridges", "local_bridges"] diff --git a/stubs/networkx/algorithms/centrality/betweenness.pyi b/stubs/networkx/algorithms/centrality/betweenness.pyi index 7023e82e..a7c7221c 100644 --- a/stubs/networkx/algorithms/centrality/betweenness.pyi +++ b/stubs/networkx/algorithms/centrality/betweenness.pyi @@ -1,12 +1,7 @@ -import warnings -from collections import deque -from heapq import heappop, heappush -from itertools import count from typing import Mapping from ...classes.graph import Graph from ...utils import py_random_state -from ...utils.decorators import not_implemented_for __all__ = ["betweenness_centrality", "edge_betweenness_centrality", "edge_betweenness"] diff --git a/stubs/networkx/algorithms/centrality/betweenness_subset.pyi b/stubs/networkx/algorithms/centrality/betweenness_subset.pyi index 24f6ff91..b1635774 100644 --- a/stubs/networkx/algorithms/centrality/betweenness_subset.pyi +++ b/stubs/networkx/algorithms/centrality/betweenness_subset.pyi @@ -1,4 +1,3 @@ -import warnings from typing import Mapping from ...classes.graph import Graph diff --git a/stubs/networkx/algorithms/centrality/closeness.pyi b/stubs/networkx/algorithms/centrality/closeness.pyi index 055b52c1..8e57713a 100644 --- a/stubs/networkx/algorithms/centrality/closeness.pyi +++ b/stubs/networkx/algorithms/centrality/closeness.pyi @@ -1,9 +1,6 @@ -import functools from typing import Mapping from ...classes.graph import Graph -from ...exception import NetworkXError -from ...utils.decorators import not_implemented_for __all__ = ["closeness_centrality", "incremental_closeness_centrality"] diff --git a/stubs/networkx/algorithms/centrality/current_flow_betweenness.pyi b/stubs/networkx/algorithms/centrality/current_flow_betweenness.pyi index 0e0aaa8f..38896cd5 100644 --- a/stubs/networkx/algorithms/centrality/current_flow_betweenness.pyi +++ b/stubs/networkx/algorithms/centrality/current_flow_betweenness.pyi @@ -1,8 +1,7 @@ from typing import Mapping from ...classes.graph import Graph -from ...utils import not_implemented_for, py_random_state, reverse_cuthill_mckee_ordering -from .flow_matrix import CGInverseLaplacian, FullInverseLaplacian, SuperLUInverseLaplacian, flow_matrix_row +from ...utils import py_random_state __all__ = [ "current_flow_betweenness_centrality", diff --git a/stubs/networkx/algorithms/centrality/current_flow_betweenness_subset.pyi b/stubs/networkx/algorithms/centrality/current_flow_betweenness_subset.pyi index 32a41ab8..38fd5ee8 100644 --- a/stubs/networkx/algorithms/centrality/current_flow_betweenness_subset.pyi +++ b/stubs/networkx/algorithms/centrality/current_flow_betweenness_subset.pyi @@ -1,8 +1,6 @@ from typing import Mapping from ...classes.graph import Graph -from ...utils import not_implemented_for, reverse_cuthill_mckee_ordering -from .flow_matrix import flow_matrix_row __all__ = [ "current_flow_betweenness_centrality_subset", diff --git a/stubs/networkx/algorithms/centrality/current_flow_closeness.pyi b/stubs/networkx/algorithms/centrality/current_flow_closeness.pyi index 4689c363..15346383 100644 --- a/stubs/networkx/algorithms/centrality/current_flow_closeness.pyi +++ b/stubs/networkx/algorithms/centrality/current_flow_closeness.pyi @@ -1,8 +1,6 @@ from typing import Mapping from ...classes.graph import Graph -from ...utils import not_implemented_for, reverse_cuthill_mckee_ordering -from .flow_matrix import CGInverseLaplacian, FullInverseLaplacian, SuperLUInverseLaplacian __all__ = ["current_flow_closeness_centrality", "information_centrality"] diff --git a/stubs/networkx/algorithms/centrality/degree_alg.pyi b/stubs/networkx/algorithms/centrality/degree_alg.pyi index 94b2dfb4..ea12331b 100644 --- a/stubs/networkx/algorithms/centrality/degree_alg.pyi +++ b/stubs/networkx/algorithms/centrality/degree_alg.pyi @@ -1,7 +1,6 @@ from typing import Mapping from ...classes.graph import Graph -from ...utils.decorators import not_implemented_for __all__ = ["degree_centrality", "in_degree_centrality", "out_degree_centrality"] diff --git a/stubs/networkx/algorithms/centrality/dispersion.pyi b/stubs/networkx/algorithms/centrality/dispersion.pyi index d66ed20d..74954165 100644 --- a/stubs/networkx/algorithms/centrality/dispersion.pyi +++ b/stubs/networkx/algorithms/centrality/dispersion.pyi @@ -1,4 +1,3 @@ -from itertools import combinations from typing import Mapping from ...classes.graph import Graph diff --git a/stubs/networkx/algorithms/centrality/eigenvector.pyi b/stubs/networkx/algorithms/centrality/eigenvector.pyi index 5da96546..bc901925 100644 --- a/stubs/networkx/algorithms/centrality/eigenvector.pyi +++ b/stubs/networkx/algorithms/centrality/eigenvector.pyi @@ -1,8 +1,6 @@ -import math from typing import Mapping from ...classes.graph import Graph -from ...utils import not_implemented_for __all__ = ["eigenvector_centrality", "eigenvector_centrality_numpy"] diff --git a/stubs/networkx/algorithms/centrality/group.pyi b/stubs/networkx/algorithms/centrality/group.pyi index 24435757..dadb038b 100644 --- a/stubs/networkx/algorithms/centrality/group.pyi +++ b/stubs/networkx/algorithms/centrality/group.pyi @@ -1,9 +1,7 @@ -from copy import deepcopy from numpy.typing import ArrayLike from ...classes.graph import Graph -from ...utils.decorators import not_implemented_for __all__ = [ "group_betweenness_centrality", diff --git a/stubs/networkx/algorithms/centrality/harmonic.pyi b/stubs/networkx/algorithms/centrality/harmonic.pyi index 26ee9e87..37c15fb8 100644 --- a/stubs/networkx/algorithms/centrality/harmonic.pyi +++ b/stubs/networkx/algorithms/centrality/harmonic.pyi @@ -1,4 +1,3 @@ -from functools import partial from typing import Mapping from ...classes.graph import Graph diff --git a/stubs/networkx/algorithms/centrality/katz.pyi b/stubs/networkx/algorithms/centrality/katz.pyi index 093a9217..6593f99a 100644 --- a/stubs/networkx/algorithms/centrality/katz.pyi +++ b/stubs/networkx/algorithms/centrality/katz.pyi @@ -1,8 +1,6 @@ -import math from typing import Mapping from ...classes.graph import Graph -from ...utils import not_implemented_for __all__ = ["katz_centrality", "katz_centrality_numpy"] diff --git a/stubs/networkx/algorithms/centrality/load.pyi b/stubs/networkx/algorithms/centrality/load.pyi index c95d1f34..db7492ac 100644 --- a/stubs/networkx/algorithms/centrality/load.pyi +++ b/stubs/networkx/algorithms/centrality/load.pyi @@ -1,4 +1,3 @@ -from operator import itemgetter from typing import Mapping from ...classes.graph import Graph diff --git a/stubs/networkx/algorithms/centrality/reaching.pyi b/stubs/networkx/algorithms/centrality/reaching.pyi index fa3f6d9f..1e9f0f2d 100644 --- a/stubs/networkx/algorithms/centrality/reaching.pyi +++ b/stubs/networkx/algorithms/centrality/reaching.pyi @@ -1,6 +1,4 @@ from ...classes.digraph import DiGraph -from ...classes.graph import Graph -from ...utils import pairwise __all__ = ["global_reaching_centrality", "local_reaching_centrality"] diff --git a/stubs/networkx/algorithms/centrality/second_order.pyi b/stubs/networkx/algorithms/centrality/second_order.pyi index 928abe3c..76a391a4 100644 --- a/stubs/networkx/algorithms/centrality/second_order.pyi +++ b/stubs/networkx/algorithms/centrality/second_order.pyi @@ -1,7 +1,6 @@ from typing import Mapping from ...classes.graph import Graph -from ...utils import not_implemented_for # Authors: Erwan Le Merrer (erwan.lemerrer@technicolor.com) diff --git a/stubs/networkx/algorithms/centrality/subgraph_alg.pyi b/stubs/networkx/algorithms/centrality/subgraph_alg.pyi index c58a6b18..fb0f19ef 100644 --- a/stubs/networkx/algorithms/centrality/subgraph_alg.pyi +++ b/stubs/networkx/algorithms/centrality/subgraph_alg.pyi @@ -1,7 +1,6 @@ from typing import Mapping from ...classes.graph import Graph -from ...utils import not_implemented_for __all__ = [ "subgraph_centrality_exp", diff --git a/stubs/networkx/algorithms/centrality/trophic.pyi b/stubs/networkx/algorithms/centrality/trophic.pyi index 5f7b14ad..43c76766 100644 --- a/stubs/networkx/algorithms/centrality/trophic.pyi +++ b/stubs/networkx/algorithms/centrality/trophic.pyi @@ -1,7 +1,6 @@ from typing import Mapping from ...classes.digraph import DiGraph -from ...utils import not_implemented_for __all__ = ["trophic_levels", "trophic_differences", "trophic_incoherence_parameter"] diff --git a/stubs/networkx/algorithms/chains.pyi b/stubs/networkx/algorithms/chains.pyi index bcd19701..83d99714 100644 --- a/stubs/networkx/algorithms/chains.pyi +++ b/stubs/networkx/algorithms/chains.pyi @@ -1,5 +1,4 @@ from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = ["chain_decomposition"] diff --git a/stubs/networkx/algorithms/chordal.pyi b/stubs/networkx/algorithms/chordal.pyi index cb8c7b41..0007ec41 100644 --- a/stubs/networkx/algorithms/chordal.pyi +++ b/stubs/networkx/algorithms/chordal.pyi @@ -1,10 +1,6 @@ -import sys -import warnings -from ..algorithms.components import connected_components from ..classes.graph import Graph from ..exception import NetworkXException -from ..utils import arbitrary_element, not_implemented_for __all__ = [ "is_chordal", diff --git a/stubs/networkx/algorithms/clique.pyi b/stubs/networkx/algorithms/clique.pyi index ccd4465c..179d93a3 100644 --- a/stubs/networkx/algorithms/clique.pyi +++ b/stubs/networkx/algorithms/clique.pyi @@ -1,10 +1,7 @@ -from collections import defaultdict, deque -from itertools import chain, combinations, islice from numpy.typing import ArrayLike from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = [ "find_cliques", diff --git a/stubs/networkx/algorithms/cluster.pyi b/stubs/networkx/algorithms/cluster.pyi index 550636a6..1c657d5c 100644 --- a/stubs/networkx/algorithms/cluster.pyi +++ b/stubs/networkx/algorithms/cluster.pyi @@ -1,9 +1,6 @@ -from collections import Counter -from itertools import chain, combinations from typing import Mapping from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = [ "triangles", diff --git a/stubs/networkx/algorithms/coloring/equitable_coloring.pyi b/stubs/networkx/algorithms/coloring/equitable_coloring.pyi index 19668e3b..3604a8f3 100644 --- a/stubs/networkx/algorithms/coloring/equitable_coloring.pyi +++ b/stubs/networkx/algorithms/coloring/equitable_coloring.pyi @@ -1,4 +1,3 @@ -from collections import defaultdict from ...classes.graph import Graph diff --git a/stubs/networkx/algorithms/coloring/greedy_coloring.pyi b/stubs/networkx/algorithms/coloring/greedy_coloring.pyi index ea751ca7..0c1b031f 100644 --- a/stubs/networkx/algorithms/coloring/greedy_coloring.pyi +++ b/stubs/networkx/algorithms/coloring/greedy_coloring.pyi @@ -1,8 +1,6 @@ -import itertools -from collections import defaultdict, deque from ...classes.graph import Graph -from ...utils import arbitrary_element, py_random_state +from ...utils import py_random_state __all__ = [ "greedy_color", diff --git a/stubs/networkx/algorithms/communicability_alg.pyi b/stubs/networkx/algorithms/communicability_alg.pyi index 37dbd30a..1582073e 100644 --- a/stubs/networkx/algorithms/communicability_alg.pyi +++ b/stubs/networkx/algorithms/communicability_alg.pyi @@ -1,7 +1,5 @@ -from typing import Mapping from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = ["communicability", "communicability_exp"] diff --git a/stubs/networkx/algorithms/community/asyn_fluid.pyi b/stubs/networkx/algorithms/community/asyn_fluid.pyi index f6da7844..09759c03 100644 --- a/stubs/networkx/algorithms/community/asyn_fluid.pyi +++ b/stubs/networkx/algorithms/community/asyn_fluid.pyi @@ -1,10 +1,7 @@ -from collections import Counter from collections.abc import Iterable -from ...algorithms.components import is_connected from ...classes.graph import Graph -from ...exception import NetworkXError -from ...utils import groups, not_implemented_for, py_random_state +from ...utils import py_random_state __all__ = ["asyn_fluidc"] diff --git a/stubs/networkx/algorithms/community/kclique.pyi b/stubs/networkx/algorithms/community/kclique.pyi index 4afb1fcd..d244c543 100644 --- a/stubs/networkx/algorithms/community/kclique.pyi +++ b/stubs/networkx/algorithms/community/kclique.pyi @@ -1,4 +1,3 @@ -from collections import defaultdict from ...classes.graph import Graph diff --git a/stubs/networkx/algorithms/community/kernighan_lin.pyi b/stubs/networkx/algorithms/community/kernighan_lin.pyi index d58b6b2f..253b0ca8 100644 --- a/stubs/networkx/algorithms/community/kernighan_lin.pyi +++ b/stubs/networkx/algorithms/community/kernighan_lin.pyi @@ -1,8 +1,6 @@ -from itertools import count from ...classes.graph import Graph -from ...utils import BinaryHeap, not_implemented_for, py_random_state -from .community_utils import is_partition +from ...utils import py_random_state __all__ = ["kernighan_lin_bisection"] diff --git a/stubs/networkx/algorithms/community/label_propagation.pyi b/stubs/networkx/algorithms/community/label_propagation.pyi index 5ed1beac..905d30d3 100644 --- a/stubs/networkx/algorithms/community/label_propagation.pyi +++ b/stubs/networkx/algorithms/community/label_propagation.pyi @@ -1,8 +1,7 @@ -from collections import Counter, defaultdict from collections.abc import Iterable from ...classes.graph import Graph -from ...utils import groups, not_implemented_for, py_random_state +from ...utils import py_random_state __all__ = ["label_propagation_communities", "asyn_lpa_communities"] diff --git a/stubs/networkx/algorithms/community/louvain.pyi b/stubs/networkx/algorithms/community/louvain.pyi index b38b90a5..956b18d8 100644 --- a/stubs/networkx/algorithms/community/louvain.pyi +++ b/stubs/networkx/algorithms/community/louvain.pyi @@ -1,4 +1,3 @@ -from collections import defaultdict, deque from numpy.typing import ArrayLike diff --git a/stubs/networkx/algorithms/community/lukes.pyi b/stubs/networkx/algorithms/community/lukes.pyi index eec2879d..cfa05a5d 100644 --- a/stubs/networkx/algorithms/community/lukes.pyi +++ b/stubs/networkx/algorithms/community/lukes.pyi @@ -1,11 +1,7 @@ -from copy import deepcopy -from functools import lru_cache -from random import choice from numpy.typing import ArrayLike from ...classes.graph import Graph -from ...utils import not_implemented_for __all__ = ["lukes_partitioning"] diff --git a/stubs/networkx/algorithms/community/modularity_max.pyi b/stubs/networkx/algorithms/community/modularity_max.pyi index 8e758e9f..f2defff0 100644 --- a/stubs/networkx/algorithms/community/modularity_max.pyi +++ b/stubs/networkx/algorithms/community/modularity_max.pyi @@ -1,11 +1,7 @@ -from collections import defaultdict from numpy.typing import ArrayLike from ...classes.graph import Graph -from ...utils import not_implemented_for -from ...utils.mapped_queue import MappedQueue -from .quality import modularity __all__ = [ "greedy_modularity_communities", diff --git a/stubs/networkx/algorithms/community/quality.pyi b/stubs/networkx/algorithms/community/quality.pyi index ddb7fb2b..854b70b5 100644 --- a/stubs/networkx/algorithms/community/quality.pyi +++ b/stubs/networkx/algorithms/community/quality.pyi @@ -1,12 +1,8 @@ -from itertools import combinations from typing import Sequence from networkx import NetworkXError from ...classes.graph import Graph -from ...utils import not_implemented_for -from ...utils.decorators import argmap -from .community_utils import is_partition __all__ = ["coverage", "modularity", "performance", "partition_quality"] diff --git a/stubs/networkx/algorithms/components/attracting.pyi b/stubs/networkx/algorithms/components/attracting.pyi index edb3570f..ec2c5fe8 100644 --- a/stubs/networkx/algorithms/components/attracting.pyi +++ b/stubs/networkx/algorithms/components/attracting.pyi @@ -1,6 +1,5 @@ from ...classes.digraph import DiGraph from ...classes.multidigraph import MultiDiGraph -from ...utils.decorators import not_implemented_for __all__ = [ "number_attracting_components", diff --git a/stubs/networkx/algorithms/components/biconnected.pyi b/stubs/networkx/algorithms/components/biconnected.pyi index 5e352749..44bb4d94 100644 --- a/stubs/networkx/algorithms/components/biconnected.pyi +++ b/stubs/networkx/algorithms/components/biconnected.pyi @@ -1,7 +1,5 @@ -from itertools import chain from ...classes.graph import Graph -from ...utils.decorators import not_implemented_for __all__ = [ "biconnected_components", diff --git a/stubs/networkx/algorithms/components/connected.pyi b/stubs/networkx/algorithms/components/connected.pyi index b22156da..bf063685 100644 --- a/stubs/networkx/algorithms/components/connected.pyi +++ b/stubs/networkx/algorithms/components/connected.pyi @@ -1,6 +1,4 @@ from ...classes.graph import Graph -from ...utils import arbitrary_element -from ...utils.decorators import not_implemented_for __all__ = [ "number_connected_components", diff --git a/stubs/networkx/algorithms/components/semiconnected.pyi b/stubs/networkx/algorithms/components/semiconnected.pyi index 5f9b6588..7dc443f5 100644 --- a/stubs/networkx/algorithms/components/semiconnected.pyi +++ b/stubs/networkx/algorithms/components/semiconnected.pyi @@ -1,7 +1,6 @@ from numpy.typing import ArrayLike from ...classes.graph import Graph -from ...utils import not_implemented_for, pairwise __all__ = ["is_semiconnected"] diff --git a/stubs/networkx/algorithms/components/strongly_connected.pyi b/stubs/networkx/algorithms/components/strongly_connected.pyi index ce5293dd..389aebec 100644 --- a/stubs/networkx/algorithms/components/strongly_connected.pyi +++ b/stubs/networkx/algorithms/components/strongly_connected.pyi @@ -1,5 +1,4 @@ from ...classes.graph import Graph -from ...utils.decorators import not_implemented_for __all__ = [ "number_strongly_connected_components", diff --git a/stubs/networkx/algorithms/components/weakly_connected.pyi b/stubs/networkx/algorithms/components/weakly_connected.pyi index 70f328c8..11432ff4 100644 --- a/stubs/networkx/algorithms/components/weakly_connected.pyi +++ b/stubs/networkx/algorithms/components/weakly_connected.pyi @@ -1,5 +1,4 @@ from ...classes.graph import Graph -from ...utils.decorators import not_implemented_for __all__ = [ "number_weakly_connected_components", diff --git a/stubs/networkx/algorithms/connectivity/connectivity.pyi b/stubs/networkx/algorithms/connectivity/connectivity.pyi index 11cc0532..c648dc8a 100644 --- a/stubs/networkx/algorithms/connectivity/connectivity.pyi +++ b/stubs/networkx/algorithms/connectivity/connectivity.pyi @@ -1,15 +1,11 @@ -import itertools -from operator import itemgetter from typing import Mapping # Define the default maximum flow function to use in all flow based # connectivity algorithms. -from ...algorithms.flow import boykov_kolmogorov, build_residual_network, dinitz, edmonds_karp, shortest_augmenting_path from ...classes.graph import Graph default_flow_func = ... -from .utils import build_auxiliary_edge_connectivity, build_auxiliary_node_connectivity __all__ = [ "average_node_connectivity", diff --git a/stubs/networkx/algorithms/connectivity/cuts.pyi b/stubs/networkx/algorithms/connectivity/cuts.pyi index 6f150cca..7549461a 100644 --- a/stubs/networkx/algorithms/connectivity/cuts.pyi +++ b/stubs/networkx/algorithms/connectivity/cuts.pyi @@ -1,13 +1,10 @@ -import itertools # Define the default maximum flow function to use in all flow based # cut algorithms. -from ...algorithms.flow import build_residual_network, edmonds_karp from ...classes.graph import Graph default_flow_func = ... -from .utils import build_auxiliary_edge_connectivity, build_auxiliary_node_connectivity __all__ = [ "minimum_st_node_cut", diff --git a/stubs/networkx/algorithms/connectivity/disjoint_paths.pyi b/stubs/networkx/algorithms/connectivity/disjoint_paths.pyi index 09704684..3a77d76b 100644 --- a/stubs/networkx/algorithms/connectivity/disjoint_paths.pyi +++ b/stubs/networkx/algorithms/connectivity/disjoint_paths.pyi @@ -1,14 +1,10 @@ # Define the default maximum flow function to use for the undelying # maximum flow computations -from ...algorithms.flow import edmonds_karp, preflow_push, shortest_augmenting_path from ...classes.graph import Graph -from ...exception import NetworkXNoPath default_flow_func = ... -from itertools import filterfalse as _filterfalse # Functions to build auxiliary data structures. -from .utils import build_auxiliary_edge_connectivity, build_auxiliary_node_connectivity __all__ = ["edge_disjoint_paths", "node_disjoint_paths"] diff --git a/stubs/networkx/algorithms/connectivity/edge_augmentation.pyi b/stubs/networkx/algorithms/connectivity/edge_augmentation.pyi index a635a33a..e3462f84 100644 --- a/stubs/networkx/algorithms/connectivity/edge_augmentation.pyi +++ b/stubs/networkx/algorithms/connectivity/edge_augmentation.pyi @@ -1,9 +1,6 @@ -import itertools as it -import math -from collections import defaultdict, namedtuple from ...classes.graph import Graph -from ...utils import not_implemented_for, py_random_state +from ...utils import py_random_state __all__ = ["k_edge_augmentation", "is_k_edge_connected", "is_locally_k_edge_connected"] diff --git a/stubs/networkx/algorithms/connectivity/edge_kcomponents.pyi b/stubs/networkx/algorithms/connectivity/edge_kcomponents.pyi index 76b85319..5ee1c66a 100644 --- a/stubs/networkx/algorithms/connectivity/edge_kcomponents.pyi +++ b/stubs/networkx/algorithms/connectivity/edge_kcomponents.pyi @@ -1,9 +1,5 @@ -import itertools as it -from functools import partial -from ...algorithms import bridges from ...classes.graph import Graph -from ...utils import arbitrary_element, not_implemented_for __all__ = [ "k_edge_components", diff --git a/stubs/networkx/algorithms/connectivity/kcomponents.pyi b/stubs/networkx/algorithms/connectivity/kcomponents.pyi index aea85fe6..7fc8efb4 100644 --- a/stubs/networkx/algorithms/connectivity/kcomponents.pyi +++ b/stubs/networkx/algorithms/connectivity/kcomponents.pyi @@ -1,12 +1,7 @@ -from collections import defaultdict -from itertools import combinations -from operator import itemgetter from typing import Mapping # Define the default maximum flow function. -from ...algorithms.flow import edmonds_karp from ...classes.graph import Graph -from ...utils import not_implemented_for default_flow_func = ... diff --git a/stubs/networkx/algorithms/connectivity/kcutsets.pyi b/stubs/networkx/algorithms/connectivity/kcutsets.pyi index b44fb207..35152223 100644 --- a/stubs/networkx/algorithms/connectivity/kcutsets.pyi +++ b/stubs/networkx/algorithms/connectivity/kcutsets.pyi @@ -1,11 +1,5 @@ -import copy -from collections import defaultdict -from itertools import combinations -from operator import itemgetter -from ...algorithms.flow import build_residual_network, edmonds_karp, shortest_augmenting_path from ...classes.graph import Graph -from .utils import build_auxiliary_node_connectivity default_flow_func = ... diff --git a/stubs/networkx/algorithms/connectivity/stoerwagner.pyi b/stubs/networkx/algorithms/connectivity/stoerwagner.pyi index 36eef474..cd3366d3 100644 --- a/stubs/networkx/algorithms/connectivity/stoerwagner.pyi +++ b/stubs/networkx/algorithms/connectivity/stoerwagner.pyi @@ -1,7 +1,5 @@ -from itertools import islice from ...classes.graph import Graph -from ...utils import BinaryHeap, arbitrary_element, not_implemented_for __all__ = ["stoer_wagner"] diff --git a/stubs/networkx/algorithms/core.pyi b/stubs/networkx/algorithms/core.pyi index 5b8896c1..03b545c7 100644 --- a/stubs/networkx/algorithms/core.pyi +++ b/stubs/networkx/algorithms/core.pyi @@ -1,8 +1,6 @@ from typing import Mapping from ..classes.graph import Graph -from ..exception import NetworkXError -from ..utils import not_implemented_for __all__ = [ "core_number", diff --git a/stubs/networkx/algorithms/covering.pyi b/stubs/networkx/algorithms/covering.pyi index b72c02f1..8f5426e5 100644 --- a/stubs/networkx/algorithms/covering.pyi +++ b/stubs/networkx/algorithms/covering.pyi @@ -1,8 +1,5 @@ -from functools import partial -from itertools import chain from ..classes.graph import Graph -from ..utils import arbitrary_element, not_implemented_for __all__ = ["min_edge_cover", "is_edge_cover"] diff --git a/stubs/networkx/algorithms/cuts.pyi b/stubs/networkx/algorithms/cuts.pyi index 35eca7f1..b9ada756 100644 --- a/stubs/networkx/algorithms/cuts.pyi +++ b/stubs/networkx/algorithms/cuts.pyi @@ -1,4 +1,3 @@ -from itertools import chain from typing import Any from ..classes.graph import Graph diff --git a/stubs/networkx/algorithms/cycles.pyi b/stubs/networkx/algorithms/cycles.pyi index f663de73..b532fcb2 100644 --- a/stubs/networkx/algorithms/cycles.pyi +++ b/stubs/networkx/algorithms/cycles.pyi @@ -1,7 +1,5 @@ -from collections import defaultdict from ..classes.graph import Graph -from ..utils import not_implemented_for, pairwise __all__ = [ "cycle_basis", diff --git a/stubs/networkx/algorithms/d_separation.pyi b/stubs/networkx/algorithms/d_separation.pyi index c9b7a774..963bb783 100644 --- a/stubs/networkx/algorithms/d_separation.pyi +++ b/stubs/networkx/algorithms/d_separation.pyi @@ -1,7 +1,5 @@ -from collections import deque from ..classes.graph import Graph -from ..utils import UnionFind, not_implemented_for __all__ = ["d_separated"] diff --git a/stubs/networkx/algorithms/dag.pyi b/stubs/networkx/algorithms/dag.pyi index fac38ead..f8ddaec4 100644 --- a/stubs/networkx/algorithms/dag.pyi +++ b/stubs/networkx/algorithms/dag.pyi @@ -1,14 +1,8 @@ -import heapq -from collections import deque -from functools import partial -from itertools import chain, product, starmap -from math import gcd from numpy.typing import ArrayLike from ..classes.digraph import DiGraph from ..classes.graph import Graph -from ..utils import arbitrary_element, not_implemented_for, pairwise __all__ = [ "descendants", diff --git a/stubs/networkx/algorithms/distance_measures.pyi b/stubs/networkx/algorithms/distance_measures.pyi index 26aa5328..4fae4160 100644 --- a/stubs/networkx/algorithms/distance_measures.pyi +++ b/stubs/networkx/algorithms/distance_measures.pyi @@ -3,7 +3,6 @@ from typing import Mapping from numpy.typing import ArrayLike from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = [ "extrema_bounding", diff --git a/stubs/networkx/algorithms/distance_regular.pyi b/stubs/networkx/algorithms/distance_regular.pyi index 20399098..7907b846 100644 --- a/stubs/networkx/algorithms/distance_regular.pyi +++ b/stubs/networkx/algorithms/distance_regular.pyi @@ -3,8 +3,6 @@ from collections.abc import Iterable from numpy.typing import ArrayLike from ..classes.graph import Graph -from ..utils import not_implemented_for -from .distance_measures import diameter __all__ = [ "is_distance_regular", diff --git a/stubs/networkx/algorithms/dominance.pyi b/stubs/networkx/algorithms/dominance.pyi index 4be6cb49..0532640b 100644 --- a/stubs/networkx/algorithms/dominance.pyi +++ b/stubs/networkx/algorithms/dominance.pyi @@ -1,7 +1,5 @@ -from functools import reduce from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = ["immediate_dominators", "dominance_frontiers"] diff --git a/stubs/networkx/algorithms/dominating.pyi b/stubs/networkx/algorithms/dominating.pyi index d47abb00..61f3d3bd 100644 --- a/stubs/networkx/algorithms/dominating.pyi +++ b/stubs/networkx/algorithms/dominating.pyi @@ -1,8 +1,6 @@ from collections.abc import Iterable -from itertools import chain from ..classes.graph import Graph -from ..utils import arbitrary_element __all__ = ["dominating_set", "is_dominating_set"] diff --git a/stubs/networkx/algorithms/efficiency_measures.pyi b/stubs/networkx/algorithms/efficiency_measures.pyi index df808234..b36f15ce 100644 --- a/stubs/networkx/algorithms/efficiency_measures.pyi +++ b/stubs/networkx/algorithms/efficiency_measures.pyi @@ -1,6 +1,4 @@ from ..classes.graph import Graph -from ..exception import NetworkXNoPath -from ..utils import not_implemented_for __all__ = ["efficiency", "local_efficiency", "global_efficiency"] diff --git a/stubs/networkx/algorithms/euler.pyi b/stubs/networkx/algorithms/euler.pyi index cbc9f83c..72a17336 100644 --- a/stubs/networkx/algorithms/euler.pyi +++ b/stubs/networkx/algorithms/euler.pyi @@ -1,7 +1,5 @@ -from itertools import combinations from ..classes.graph import Graph -from ..utils import arbitrary_element, not_implemented_for __all__ = [ "is_eulerian", diff --git a/stubs/networkx/algorithms/flow/boykovkolmogorov.pyi b/stubs/networkx/algorithms/flow/boykovkolmogorov.pyi index dd77229f..064e3ac5 100644 --- a/stubs/networkx/algorithms/flow/boykovkolmogorov.pyi +++ b/stubs/networkx/algorithms/flow/boykovkolmogorov.pyi @@ -1,7 +1,4 @@ -from collections import deque -from operator import itemgetter -from ...algorithms.flow.utils import build_residual_network from ...classes.graph import Graph __all__ = ["boykov_kolmogorov"] diff --git a/stubs/networkx/algorithms/flow/capacityscaling.pyi b/stubs/networkx/algorithms/flow/capacityscaling.pyi index 46a4ac90..8f8b2149 100644 --- a/stubs/networkx/algorithms/flow/capacityscaling.pyi +++ b/stubs/networkx/algorithms/flow/capacityscaling.pyi @@ -1,10 +1,7 @@ __all__ = ["capacity_scaling"] -from itertools import chain -from math import log from ...classes.graph import Graph -from ...utils import BinaryHeap, arbitrary_element, not_implemented_for def capacity_scaling( G: Graph, diff --git a/stubs/networkx/algorithms/flow/dinitz_alg.pyi b/stubs/networkx/algorithms/flow/dinitz_alg.pyi index 5e347158..382c9e73 100644 --- a/stubs/networkx/algorithms/flow/dinitz_alg.pyi +++ b/stubs/networkx/algorithms/flow/dinitz_alg.pyi @@ -1,8 +1,5 @@ -from collections import deque -from ...algorithms.flow.utils import build_residual_network from ...classes.graph import Graph -from ...utils import pairwise __all__ = ["dinitz"] diff --git a/stubs/networkx/algorithms/flow/edmondskarp.pyi b/stubs/networkx/algorithms/flow/edmondskarp.pyi index 43e424b8..03e1c0be 100644 --- a/stubs/networkx/algorithms/flow/edmondskarp.pyi +++ b/stubs/networkx/algorithms/flow/edmondskarp.pyi @@ -1,4 +1,3 @@ -from ...algorithms.flow.utils import build_residual_network from ...classes.graph import Graph __all__ = ["edmonds_karp"] diff --git a/stubs/networkx/algorithms/flow/gomory_hu.pyi b/stubs/networkx/algorithms/flow/gomory_hu.pyi index 6527385a..1243f5bf 100644 --- a/stubs/networkx/algorithms/flow/gomory_hu.pyi +++ b/stubs/networkx/algorithms/flow/gomory_hu.pyi @@ -1,7 +1,4 @@ from ...classes.graph import Graph -from ...utils import not_implemented_for -from .edmondskarp import edmonds_karp -from .utils import build_residual_network default_flow_func = ... diff --git a/stubs/networkx/algorithms/flow/maxflow.pyi b/stubs/networkx/algorithms/flow/maxflow.pyi index 7fd0e379..4cf6337d 100644 --- a/stubs/networkx/algorithms/flow/maxflow.pyi +++ b/stubs/networkx/algorithms/flow/maxflow.pyi @@ -1,10 +1,4 @@ from ...classes.graph import Graph -from .boykovkolmogorov import boykov_kolmogorov -from .dinitz_alg import dinitz -from .edmondskarp import edmonds_karp -from .preflowpush import preflow_push -from .shortestaugmentingpath import shortest_augmenting_path -from .utils import build_flow_dict # Define the default flow function for computing maximum flow. default_flow_func = ... diff --git a/stubs/networkx/algorithms/flow/networksimplex.pyi b/stubs/networkx/algorithms/flow/networksimplex.pyi index 09c55f43..ed235407 100644 --- a/stubs/networkx/algorithms/flow/networksimplex.pyi +++ b/stubs/networkx/algorithms/flow/networksimplex.pyi @@ -1,10 +1,7 @@ __all__ = ["network_simplex"] -from itertools import chain, islice, repeat -from math import ceil, sqrt from ...classes.graph import Graph -from ...utils import not_implemented_for class _DataEssentialsAndFunctions: def __init__( diff --git a/stubs/networkx/algorithms/flow/preflowpush.pyi b/stubs/networkx/algorithms/flow/preflowpush.pyi index 5e1844e8..a8f2d441 100644 --- a/stubs/networkx/algorithms/flow/preflowpush.pyi +++ b/stubs/networkx/algorithms/flow/preflowpush.pyi @@ -1,9 +1,5 @@ -from collections import deque -from itertools import islice from ...classes.graph import Graph -from ...utils import arbitrary_element -from .utils import CurrentEdge, GlobalRelabelThreshold, Level, build_residual_network, detect_unboundedness __all__ = ["preflow_push"] diff --git a/stubs/networkx/algorithms/flow/shortestaugmentingpath.pyi b/stubs/networkx/algorithms/flow/shortestaugmentingpath.pyi index abf9da7f..a0a24f33 100644 --- a/stubs/networkx/algorithms/flow/shortestaugmentingpath.pyi +++ b/stubs/networkx/algorithms/flow/shortestaugmentingpath.pyi @@ -1,8 +1,5 @@ -from collections import deque from ...classes.graph import Graph -from .edmondskarp import edmonds_karp_core -from .utils import CurrentEdge, build_residual_network __all__ = ["shortest_augmenting_path"] diff --git a/stubs/networkx/algorithms/flow/utils.pyi b/stubs/networkx/algorithms/flow/utils.pyi index 5a94581c..529d614b 100644 --- a/stubs/networkx/algorithms/flow/utils.pyi +++ b/stubs/networkx/algorithms/flow/utils.pyi @@ -1,4 +1,3 @@ -from collections import deque from ...classes.graph import Graph diff --git a/stubs/networkx/algorithms/graph_hashing.pyi b/stubs/networkx/algorithms/graph_hashing.pyi index 8c6c416b..964ab958 100644 --- a/stubs/networkx/algorithms/graph_hashing.pyi +++ b/stubs/networkx/algorithms/graph_hashing.pyi @@ -1,5 +1,3 @@ -from collections import Counter, defaultdict -from hashlib import blake2b from typing import Mapping from ..classes.graph import Graph diff --git a/stubs/networkx/algorithms/graphical.pyi b/stubs/networkx/algorithms/graphical.pyi index a9a3e2be..e682977d 100644 --- a/stubs/networkx/algorithms/graphical.pyi +++ b/stubs/networkx/algorithms/graphical.pyi @@ -1,9 +1,6 @@ -import heapq from numpy.typing import ArrayLike -from ..classes.graph import Graph - __all__ = [ "is_graphical", "is_multigraphical", diff --git a/stubs/networkx/algorithms/hybrid.pyi b/stubs/networkx/algorithms/hybrid.pyi index efb95950..cf519eb1 100644 --- a/stubs/networkx/algorithms/hybrid.pyi +++ b/stubs/networkx/algorithms/hybrid.pyi @@ -1,4 +1,3 @@ -import copy from ..classes.graph import Graph diff --git a/stubs/networkx/algorithms/isomorphism/ismags.pyi b/stubs/networkx/algorithms/isomorphism/ismags.pyi index b3ef4f27..cf2afb02 100644 --- a/stubs/networkx/algorithms/isomorphism/ismags.pyi +++ b/stubs/networkx/algorithms/isomorphism/ismags.pyi @@ -4,9 +4,6 @@ from ...classes.graph import Graph __all__ = ["ISMAGS"] -import itertools -from collections import Counter, defaultdict -from functools import reduce, wraps def are_all_equal(iterable) -> bool: ... def make_partitions(items, test): ... diff --git a/stubs/networkx/algorithms/isomorphism/isomorph.pyi b/stubs/networkx/algorithms/isomorphism/isomorph.pyi index b4f51af3..28a6cd20 100644 --- a/stubs/networkx/algorithms/isomorphism/isomorph.pyi +++ b/stubs/networkx/algorithms/isomorphism/isomorph.pyi @@ -1,7 +1,6 @@ from typing import Callable from ...classes.graph import Graph -from ...exception import NetworkXError __all__ = [ "could_be_isomorphic", diff --git a/stubs/networkx/algorithms/isomorphism/isomorphvf2.pyi b/stubs/networkx/algorithms/isomorphism/isomorphvf2.pyi index d6e8752a..d8a391f8 100644 --- a/stubs/networkx/algorithms/isomorphism/isomorphvf2.pyi +++ b/stubs/networkx/algorithms/isomorphism/isomorphvf2.pyi @@ -3,7 +3,6 @@ # James P. Crutchfield, principal investigator. # Complexity Sciences Center and Physics Department, UC Davis. -import sys from ...classes.graph import Graph diff --git a/stubs/networkx/algorithms/isomorphism/matchhelpers.pyi b/stubs/networkx/algorithms/isomorphism/matchhelpers.pyi index d8ee5f0d..f702e404 100644 --- a/stubs/networkx/algorithms/isomorphism/matchhelpers.pyi +++ b/stubs/networkx/algorithms/isomorphism/matchhelpers.pyi @@ -1,12 +1,7 @@ -import math -import types -from itertools import permutations from typing import Callable from numpy.typing import ArrayLike -from ...classes.graph import Graph - __all__ = [ "categorical_node_match", "categorical_edge_match", diff --git a/stubs/networkx/algorithms/isomorphism/tree_isomorphism.pyi b/stubs/networkx/algorithms/isomorphism/tree_isomorphism.pyi index bf754a1f..049ac299 100644 --- a/stubs/networkx/algorithms/isomorphism/tree_isomorphism.pyi +++ b/stubs/networkx/algorithms/isomorphism/tree_isomorphism.pyi @@ -1,7 +1,6 @@ from numpy.typing import ArrayLike from ...classes.graph import Graph -from ...utils.decorators import not_implemented_for __all__ = ["rooted_tree_isomorphism", "tree_isomorphism"] diff --git a/stubs/networkx/algorithms/link_analysis/pagerank_alg.pyi b/stubs/networkx/algorithms/link_analysis/pagerank_alg.pyi index 5751a764..7b3eb2fc 100644 --- a/stubs/networkx/algorithms/link_analysis/pagerank_alg.pyi +++ b/stubs/networkx/algorithms/link_analysis/pagerank_alg.pyi @@ -1,5 +1,4 @@ from typing import Mapping -from warnings import warn from numpy.typing import ArrayLike diff --git a/stubs/networkx/algorithms/link_prediction.pyi b/stubs/networkx/algorithms/link_prediction.pyi index 1f0e01e3..7ccb3424 100644 --- a/stubs/networkx/algorithms/link_prediction.pyi +++ b/stubs/networkx/algorithms/link_prediction.pyi @@ -1,7 +1,5 @@ -from math import log from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = [ "resource_allocation_index", diff --git a/stubs/networkx/algorithms/lowest_common_ancestors.pyi b/stubs/networkx/algorithms/lowest_common_ancestors.pyi index 269cbbb4..930088c5 100644 --- a/stubs/networkx/algorithms/lowest_common_ancestors.pyi +++ b/stubs/networkx/algorithms/lowest_common_ancestors.pyi @@ -1,10 +1,6 @@ -from collections import defaultdict -from collections.abc import Mapping, Set -from itertools import combinations_with_replacement from typing import Any from ..classes.graph import Graph -from ..utils import UnionFind, arbitrary_element, not_implemented_for __all__ = [ "all_pairs_lowest_common_ancestor", diff --git a/stubs/networkx/algorithms/matching.pyi b/stubs/networkx/algorithms/matching.pyi index 9426401c..40a883ad 100644 --- a/stubs/networkx/algorithms/matching.pyi +++ b/stubs/networkx/algorithms/matching.pyi @@ -1,9 +1,6 @@ -from collections import Counter -from itertools import combinations, repeat from typing import Mapping from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = [ "is_matching", diff --git a/stubs/networkx/algorithms/minors/contraction.pyi b/stubs/networkx/algorithms/minors/contraction.pyi index 0099f884..b8b1d8ac 100644 --- a/stubs/networkx/algorithms/minors/contraction.pyi +++ b/stubs/networkx/algorithms/minors/contraction.pyi @@ -1,10 +1,7 @@ -from itertools import chain, combinations, permutations, product from numpy.typing import ArrayLike from ...classes.graph import Graph -from ...exception import NetworkXException -from ...utils import arbitrary_element __all__ = [ "contracted_edge", diff --git a/stubs/networkx/algorithms/mis.pyi b/stubs/networkx/algorithms/mis.pyi index 66e15c9c..2ccfeff9 100644 --- a/stubs/networkx/algorithms/mis.pyi +++ b/stubs/networkx/algorithms/mis.pyi @@ -3,7 +3,7 @@ from collections.abc import Iterable from numpy.typing import ArrayLike from ..classes.graph import Graph -from ..utils import not_implemented_for, py_random_state +from ..utils import py_random_state __all__ = ["maximal_independent_set"] diff --git a/stubs/networkx/algorithms/moral.pyi b/stubs/networkx/algorithms/moral.pyi index bc8b7e18..e81388d9 100644 --- a/stubs/networkx/algorithms/moral.pyi +++ b/stubs/networkx/algorithms/moral.pyi @@ -1,7 +1,5 @@ -import itertools from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = ["moral_graph"] diff --git a/stubs/networkx/algorithms/node_classification/hmn.pyi b/stubs/networkx/algorithms/node_classification/hmn.pyi index c0c483ba..a19bfa33 100644 --- a/stubs/networkx/algorithms/node_classification/hmn.pyi +++ b/stubs/networkx/algorithms/node_classification/hmn.pyi @@ -1,7 +1,6 @@ from numpy.typing import ArrayLike from ...classes.graph import Graph -from ...utils.decorators import not_implemented_for __all__ = ["harmonic_function"] diff --git a/stubs/networkx/algorithms/node_classification/lgc.pyi b/stubs/networkx/algorithms/node_classification/lgc.pyi index 34ab3fea..429088aa 100644 --- a/stubs/networkx/algorithms/node_classification/lgc.pyi +++ b/stubs/networkx/algorithms/node_classification/lgc.pyi @@ -1,7 +1,6 @@ from numpy.typing import ArrayLike from ...classes.graph import Graph -from ...utils.decorators import not_implemented_for __all__ = ["local_and_global_consistency"] diff --git a/stubs/networkx/algorithms/node_classification/utils.pyi b/stubs/networkx/algorithms/node_classification/utils.pyi index 38d8c0f0..e69de29b 100644 --- a/stubs/networkx/algorithms/node_classification/utils.pyi +++ b/stubs/networkx/algorithms/node_classification/utils.pyi @@ -1 +0,0 @@ -from ...classes.graph import Graph diff --git a/stubs/networkx/algorithms/non_randomness.pyi b/stubs/networkx/algorithms/non_randomness.pyi index 8f84a93f..b971dd22 100644 --- a/stubs/networkx/algorithms/non_randomness.pyi +++ b/stubs/networkx/algorithms/non_randomness.pyi @@ -1,7 +1,5 @@ -import math from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = ["non_randomness"] diff --git a/stubs/networkx/algorithms/operators/all.pyi b/stubs/networkx/algorithms/operators/all.pyi index be40d292..519675d5 100644 --- a/stubs/networkx/algorithms/operators/all.pyi +++ b/stubs/networkx/algorithms/operators/all.pyi @@ -1,4 +1,3 @@ -from itertools import zip_longest from numpy.typing import ArrayLike diff --git a/stubs/networkx/algorithms/operators/product.pyi b/stubs/networkx/algorithms/operators/product.pyi index 7e426e72..8cef0c15 100644 --- a/stubs/networkx/algorithms/operators/product.pyi +++ b/stubs/networkx/algorithms/operators/product.pyi @@ -1,7 +1,5 @@ -from itertools import product from ...classes.graph import Graph -from ...utils import not_implemented_for __all__ = [ "tensor_product", diff --git a/stubs/networkx/algorithms/planar_drawing.pyi b/stubs/networkx/algorithms/planar_drawing.pyi index 1bfaa1b2..1e979f93 100644 --- a/stubs/networkx/algorithms/planar_drawing.pyi +++ b/stubs/networkx/algorithms/planar_drawing.pyi @@ -1,10 +1,7 @@ -from collections import defaultdict from typing import Mapping from numpy.typing import ArrayLike -from ..classes.graph import Graph - __all__ = ["combinatorial_embedding_to_pos"] def combinatorial_embedding_to_pos(embedding, fully_triangulate: bool = False) -> Mapping: ... diff --git a/stubs/networkx/algorithms/planarity.pyi b/stubs/networkx/algorithms/planarity.pyi index d104ac32..4f2f50e9 100644 --- a/stubs/networkx/algorithms/planarity.pyi +++ b/stubs/networkx/algorithms/planarity.pyi @@ -1,4 +1,3 @@ -from collections import defaultdict from typing import Mapping from numpy.typing import ArrayLike diff --git a/stubs/networkx/algorithms/polynomials.pyi b/stubs/networkx/algorithms/polynomials.pyi index 24e4a7ba..fa848f8a 100644 --- a/stubs/networkx/algorithms/polynomials.pyi +++ b/stubs/networkx/algorithms/polynomials.pyi @@ -1,7 +1,5 @@ -from collections import deque from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = ["tutte_polynomial", "chromatic_polynomial"] diff --git a/stubs/networkx/algorithms/reciprocity.pyi b/stubs/networkx/algorithms/reciprocity.pyi index 3e62beb1..cd5cfe68 100644 --- a/stubs/networkx/algorithms/reciprocity.pyi +++ b/stubs/networkx/algorithms/reciprocity.pyi @@ -1,9 +1,6 @@ from typing import Mapping -from networkx import NetworkXError - from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = ["reciprocity", "overall_reciprocity"] diff --git a/stubs/networkx/algorithms/regular.pyi b/stubs/networkx/algorithms/regular.pyi index 71c9b657..d7fc660b 100644 --- a/stubs/networkx/algorithms/regular.pyi +++ b/stubs/networkx/algorithms/regular.pyi @@ -1,5 +1,4 @@ from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = ["is_regular", "is_k_regular", "k_factor"] diff --git a/stubs/networkx/algorithms/richclub.pyi b/stubs/networkx/algorithms/richclub.pyi index f25f1d47..17c0eee3 100644 --- a/stubs/networkx/algorithms/richclub.pyi +++ b/stubs/networkx/algorithms/richclub.pyi @@ -1,8 +1,6 @@ -from itertools import accumulate from typing import Mapping from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = ["rich_club_coefficient"] diff --git a/stubs/networkx/algorithms/shortest_paths/astar.pyi b/stubs/networkx/algorithms/shortest_paths/astar.pyi index c22932db..00f50292 100644 --- a/stubs/networkx/algorithms/shortest_paths/astar.pyi +++ b/stubs/networkx/algorithms/shortest_paths/astar.pyi @@ -1,5 +1,3 @@ -from heapq import heappop, heappush -from itertools import count from ...classes.graph import Graph diff --git a/stubs/networkx/algorithms/shortest_paths/weighted.pyi b/stubs/networkx/algorithms/shortest_paths/weighted.pyi index 6c0cfa86..83d8c58f 100644 --- a/stubs/networkx/algorithms/shortest_paths/weighted.pyi +++ b/stubs/networkx/algorithms/shortest_paths/weighted.pyi @@ -1,6 +1,3 @@ -from collections import deque -from heapq import heappop, heappush -from itertools import count from typing import Mapping from numpy.typing import ArrayLike diff --git a/stubs/networkx/algorithms/similarity.pyi b/stubs/networkx/algorithms/similarity.pyi index 0fd6583f..15f867e8 100644 --- a/stubs/networkx/algorithms/similarity.pyi +++ b/stubs/networkx/algorithms/similarity.pyi @@ -1,9 +1,3 @@ -import math -import time -import warnings -from functools import reduce -from itertools import product -from operator import mul from typing import Callable, Mapping from ..classes.graph import Graph diff --git a/stubs/networkx/algorithms/simple_paths.pyi b/stubs/networkx/algorithms/simple_paths.pyi index 7d9b8ca2..b3eb6395 100644 --- a/stubs/networkx/algorithms/simple_paths.pyi +++ b/stubs/networkx/algorithms/simple_paths.pyi @@ -1,10 +1,7 @@ -from heapq import heappop, heappush -from itertools import count from numpy.typing import ArrayLike from ..classes.graph import Graph -from ..utils import not_implemented_for, pairwise __all__ = [ "all_simple_paths", diff --git a/stubs/networkx/algorithms/smallworld.pyi b/stubs/networkx/algorithms/smallworld.pyi index efba650d..d9e9c4ae 100644 --- a/stubs/networkx/algorithms/smallworld.pyi +++ b/stubs/networkx/algorithms/smallworld.pyi @@ -1,5 +1,5 @@ from ..classes.graph import Graph -from ..utils import not_implemented_for, py_random_state +from ..utils import py_random_state __all__ = ["random_reference", "lattice_reference", "sigma", "omega"] diff --git a/stubs/networkx/algorithms/sparsifiers.pyi b/stubs/networkx/algorithms/sparsifiers.pyi index 6006431c..e2776993 100644 --- a/stubs/networkx/algorithms/sparsifiers.pyi +++ b/stubs/networkx/algorithms/sparsifiers.pyi @@ -1,8 +1,7 @@ -import math from typing import Any from ..classes.graph import Graph -from ..utils import not_implemented_for, py_random_state +from ..utils import py_random_state __all__ = ["spanner"] diff --git a/stubs/networkx/algorithms/summarization.pyi b/stubs/networkx/algorithms/summarization.pyi index c148fd2e..719b592f 100644 --- a/stubs/networkx/algorithms/summarization.pyi +++ b/stubs/networkx/algorithms/summarization.pyi @@ -1,4 +1,3 @@ -from collections import Counter, defaultdict from collections.abc import Iterable from ..classes.graph import Graph diff --git a/stubs/networkx/algorithms/swap.pyi b/stubs/networkx/algorithms/swap.pyi index 0cfd84ba..b56b7e21 100644 --- a/stubs/networkx/algorithms/swap.pyi +++ b/stubs/networkx/algorithms/swap.pyi @@ -1,4 +1,3 @@ -import math from ..classes.graph import Graph from ..utils import py_random_state diff --git a/stubs/networkx/algorithms/threshold.pyi b/stubs/networkx/algorithms/threshold.pyi index 3bd1d743..1fcf85d7 100644 --- a/stubs/networkx/algorithms/threshold.pyi +++ b/stubs/networkx/algorithms/threshold.pyi @@ -1,4 +1,3 @@ -from math import sqrt from ..classes.graph import Graph from ..utils import py_random_state diff --git a/stubs/networkx/algorithms/tournament.pyi b/stubs/networkx/algorithms/tournament.pyi index d9459ac0..89d153f3 100644 --- a/stubs/networkx/algorithms/tournament.pyi +++ b/stubs/networkx/algorithms/tournament.pyi @@ -1,11 +1,9 @@ -from itertools import combinations from numpy.typing import ArrayLike -from ..algorithms.simple_paths import is_simple_path as is_path from ..classes.digraph import DiGraph from ..classes.graph import Graph -from ..utils import arbitrary_element, not_implemented_for, py_random_state +from ..utils import py_random_state __all__ = [ "hamiltonian_path", diff --git a/stubs/networkx/algorithms/traversal/beamsearch.pyi b/stubs/networkx/algorithms/traversal/beamsearch.pyi index c89ceb84..b07c5fe2 100644 --- a/stubs/networkx/algorithms/traversal/beamsearch.pyi +++ b/stubs/networkx/algorithms/traversal/beamsearch.pyi @@ -1,5 +1,4 @@ from ...classes.graph import Graph -from .breadth_first_search import generic_bfs_edges __all__ = ["bfs_beam_edges"] diff --git a/stubs/networkx/algorithms/traversal/breadth_first_search.pyi b/stubs/networkx/algorithms/traversal/breadth_first_search.pyi index 9af0193c..feb9238d 100644 --- a/stubs/networkx/algorithms/traversal/breadth_first_search.pyi +++ b/stubs/networkx/algorithms/traversal/breadth_first_search.pyi @@ -1,4 +1,3 @@ -from collections import deque from ...classes.graph import Graph diff --git a/stubs/networkx/algorithms/traversal/depth_first_search.pyi b/stubs/networkx/algorithms/traversal/depth_first_search.pyi index b6625845..d1de8955 100644 --- a/stubs/networkx/algorithms/traversal/depth_first_search.pyi +++ b/stubs/networkx/algorithms/traversal/depth_first_search.pyi @@ -1,4 +1,3 @@ -from collections import defaultdict from typing import Mapping from ...classes.graph import Graph diff --git a/stubs/networkx/algorithms/traversal/edgebfs.pyi b/stubs/networkx/algorithms/traversal/edgebfs.pyi index d32f50fa..d6d9d1d8 100644 --- a/stubs/networkx/algorithms/traversal/edgebfs.pyi +++ b/stubs/networkx/algorithms/traversal/edgebfs.pyi @@ -1,4 +1,3 @@ -from collections import deque from ...classes.graph import Graph diff --git a/stubs/networkx/algorithms/tree/branchings.pyi b/stubs/networkx/algorithms/tree/branchings.pyi index 11cb0f65..00e38219 100644 --- a/stubs/networkx/algorithms/tree/branchings.pyi +++ b/stubs/networkx/algorithms/tree/branchings.pyi @@ -17,11 +17,6 @@ # pages={109-122}, # language={English} # } -import string -from dataclasses import dataclass, field -from enum import Enum -from operator import itemgetter -from queue import PriorityQueue from typing import Literal from ...algorithms.tree.branchings import ArborescenceIterator @@ -29,7 +24,6 @@ from ...classes.digraph import DiGraph from ...classes.graph import Graph from ...classes.multidigraph import MultiDiGraph from ...utils import py_random_state -from .recognition import is_arborescence, is_branching __all__ = [ "branching_weight", diff --git a/stubs/networkx/algorithms/tree/coding.pyi b/stubs/networkx/algorithms/tree/coding.pyi index 80749e17..bfb0cc9d 100644 --- a/stubs/networkx/algorithms/tree/coding.pyi +++ b/stubs/networkx/algorithms/tree/coding.pyi @@ -1,11 +1,7 @@ -from collections import Counter -from itertools import chain from numpy.typing import ArrayLike -from ...classes.graph import Graph from ...exception import NetworkXException -from ...utils import not_implemented_for __all__ = [ "from_nested_tuple", diff --git a/stubs/networkx/algorithms/tree/decomposition.pyi b/stubs/networkx/algorithms/tree/decomposition.pyi index 474c4353..5bc1c8a5 100644 --- a/stubs/networkx/algorithms/tree/decomposition.pyi +++ b/stubs/networkx/algorithms/tree/decomposition.pyi @@ -1,10 +1,7 @@ -from itertools import combinations from networkx import Graph -from ...algorithms import chordal_graph_cliques, complete_to_chordal_graph, moral from ...classes.graph import Graph -from ...utils import not_implemented_for __all__ = ["junction_tree"] diff --git a/stubs/networkx/algorithms/tree/mst.pyi b/stubs/networkx/algorithms/tree/mst.pyi index fe043cfd..2478922e 100644 --- a/stubs/networkx/algorithms/tree/mst.pyi +++ b/stubs/networkx/algorithms/tree/mst.pyi @@ -1,14 +1,8 @@ -from dataclasses import dataclass, field from enum import Enum -from heapq import heappop, heappush -from itertools import count -from math import isnan -from operator import itemgetter -from queue import PriorityQueue from ...algorithms.tree.mst import SpanningTreeIterator from ...classes.graph import Graph -from ...utils import UnionFind, not_implemented_for, py_random_state +from ...utils import py_random_state __all__ = [ "minimum_spanning_edges", diff --git a/stubs/networkx/algorithms/tree/operations.pyi b/stubs/networkx/algorithms/tree/operations.pyi index 09cd3d2c..cb870e54 100644 --- a/stubs/networkx/algorithms/tree/operations.pyi +++ b/stubs/networkx/algorithms/tree/operations.pyi @@ -1,10 +1,6 @@ -from functools import partial -from itertools import accumulate, chain from numpy.typing import ArrayLike -from ...classes.graph import Graph - __all__ = ["join"] def join(rooted_trees: ArrayLike, label_attribute: str | None = None): ... diff --git a/stubs/networkx/algorithms/triads.pyi b/stubs/networkx/algorithms/triads.pyi index 2074e961..408d6e29 100644 --- a/stubs/networkx/algorithms/triads.pyi +++ b/stubs/networkx/algorithms/triads.pyi @@ -1,12 +1,8 @@ -from collections import defaultdict -from itertools import combinations, permutations -from random import sample from typing import Mapping from numpy.typing import ArrayLike from ..classes.graph import Graph -from ..utils import not_implemented_for # See https://github.com/networkx/networkx/pull/1474 # Copyright 2011 Reya Group diff --git a/stubs/networkx/algorithms/vitality.pyi b/stubs/networkx/algorithms/vitality.pyi index 053849ec..3f1a7edb 100644 --- a/stubs/networkx/algorithms/vitality.pyi +++ b/stubs/networkx/algorithms/vitality.pyi @@ -1,4 +1,3 @@ -from functools import partial from typing import Any from ..classes.graph import Graph diff --git a/stubs/networkx/algorithms/voronoi.pyi b/stubs/networkx/algorithms/voronoi.pyi index b96a4341..64fe91c8 100644 --- a/stubs/networkx/algorithms/voronoi.pyi +++ b/stubs/networkx/algorithms/voronoi.pyi @@ -1,7 +1,6 @@ from typing import Mapping from ..classes.graph import Graph -from ..utils import groups __all__ = ["voronoi_cells"] diff --git a/stubs/networkx/algorithms/wiener.pyi b/stubs/networkx/algorithms/wiener.pyi index 60ff51c9..f913fcf2 100644 --- a/stubs/networkx/algorithms/wiener.pyi +++ b/stubs/networkx/algorithms/wiener.pyi @@ -1,9 +1,6 @@ -from itertools import chain from typing import Any from ..classes.graph import Graph -from .components import is_connected, is_strongly_connected -from .shortest_paths import shortest_path_length as spl __all__ = ["wiener_index"] diff --git a/stubs/networkx/classes/coreviews.pyi b/stubs/networkx/classes/coreviews.pyi index f66e9e4e..5634d3cf 100644 --- a/stubs/networkx/classes/coreviews.pyi +++ b/stubs/networkx/classes/coreviews.pyi @@ -1,4 +1,3 @@ -import warnings from collections.abc import Mapping __all__ = [ diff --git a/stubs/networkx/classes/digraph.pyi b/stubs/networkx/classes/digraph.pyi index d94ff507..a163146c 100644 --- a/stubs/networkx/classes/digraph.pyi +++ b/stubs/networkx/classes/digraph.pyi @@ -1,12 +1,7 @@ -from copy import deepcopy from functools import cached_property -import networkx.convert as convert - -from ..classes.coreviews import AdjacencyView from ..classes.graph import Graph -from ..classes.reportviews import DiDegreeView, InDegreeView, InEdgeView, OutDegreeView, OutEdgeView -from ..exception import NetworkXError +from ..classes.reportviews import DiDegreeView, InEdgeView, OutEdgeView __all__ = ["DiGraph"] diff --git a/stubs/networkx/classes/function.pyi b/stubs/networkx/classes/function.pyi index 2fbdafc3..beff9c7d 100644 --- a/stubs/networkx/classes/function.pyi +++ b/stubs/networkx/classes/function.pyi @@ -1,12 +1,9 @@ -from collections import Counter from collections.abc import Iterable -from itertools import chain from numpy.typing import ArrayLike from ..classes.graph import Graph from ..classes.graphviews import reverse_view, subgraph_view -from ..utils import not_implemented_for, pairwise __all__ = [ "nodes", diff --git a/stubs/networkx/classes/graph.pyi b/stubs/networkx/classes/graph.pyi index f799168b..5f5f8dd3 100644 --- a/stubs/networkx/classes/graph.pyi +++ b/stubs/networkx/classes/graph.pyi @@ -1,16 +1,12 @@ from collections.abc import Iterable -from copy import deepcopy from functools import cached_property from typing import Mapping -import networkx.convert as convert from numpy.typing import ArrayLike -from ..classes.coreviews import AdjacencyView from ..classes.digraph import DiGraph from ..classes.graph import Graph from ..classes.reportviews import DegreeView, EdgeView, NodeView -from ..exception import NetworkXError __all__ = ["Graph"] diff --git a/stubs/networkx/classes/graphviews.pyi b/stubs/networkx/classes/graphviews.pyi index 922b61bf..7d622a15 100644 --- a/stubs/networkx/classes/graphviews.pyi +++ b/stubs/networkx/classes/graphviews.pyi @@ -2,11 +2,7 @@ from typing import Callable from networkx import DiGraph, Graph -from ..classes.coreviews import FilterAdjacency, FilterAtlas, FilterMultiAdjacency, UnionAdjacency, UnionMultiAdjacency -from ..classes.filters import no_filter from ..classes.graph import Graph -from ..exception import NetworkXError -from ..utils import not_implemented_for __all__ = ["generic_graph_view", "subgraph_view", "reverse_view"] diff --git a/stubs/networkx/classes/multidigraph.pyi b/stubs/networkx/classes/multidigraph.pyi index b77d69fe..dd690070 100644 --- a/stubs/networkx/classes/multidigraph.pyi +++ b/stubs/networkx/classes/multidigraph.pyi @@ -1,14 +1,8 @@ -from copy import deepcopy from functools import cached_property -import networkx.convert as convert - -from ..classes.coreviews import MultiAdjacencyView from ..classes.digraph import DiGraph -from ..classes.graph import Graph from ..classes.multigraph import MultiGraph -from ..classes.reportviews import DiMultiDegreeView, InMultiDegreeView, InMultiEdgeView, OutMultiDegreeView, OutMultiEdgeView -from ..exception import NetworkXError +from ..classes.reportviews import DiMultiDegreeView, InMultiEdgeView, OutMultiEdgeView __all__ = ["MultiDiGraph"] diff --git a/stubs/networkx/classes/multigraph.pyi b/stubs/networkx/classes/multigraph.pyi index 5fcfc0c7..b97eb059 100644 --- a/stubs/networkx/classes/multigraph.pyi +++ b/stubs/networkx/classes/multigraph.pyi @@ -1,11 +1,6 @@ -from copy import deepcopy from functools import cached_property from typing import Mapping -import networkx.convert as convert -from networkx import NetworkXError - -from ..classes.coreviews import MultiAdjacencyView from ..classes.graph import Graph from ..classes.multidigraph import MultiDiGraph from ..classes.reportviews import MultiDegreeView, MultiEdgeView diff --git a/stubs/networkx/classes/ordered.pyi b/stubs/networkx/classes/ordered.pyi index 1c3670c2..caf8b04d 100644 --- a/stubs/networkx/classes/ordered.pyi +++ b/stubs/networkx/classes/ordered.pyi @@ -1,5 +1,3 @@ -import warnings -from collections import OrderedDict from .digraph import DiGraph from .graph import Graph diff --git a/stubs/networkx/conftest.pyi b/stubs/networkx/conftest.pyi index 64a39a66..36bc2e53 100644 --- a/stubs/networkx/conftest.pyi +++ b/stubs/networkx/conftest.pyi @@ -1,7 +1,4 @@ -import sys -import warnings -import networkx import pytest def pytest_addoption(parser): ... diff --git a/stubs/networkx/convert.pyi b/stubs/networkx/convert.pyi index e29d0e42..bc4f9d07 100644 --- a/stubs/networkx/convert.pyi +++ b/stubs/networkx/convert.pyi @@ -1,5 +1,3 @@ -import warnings -from collections.abc import Collection, Generator, Iterator from typing import Mapping from numpy.typing import ArrayLike diff --git a/stubs/networkx/convert_matrix.pyi b/stubs/networkx/convert_matrix.pyi index 0cd0fd54..affd2e83 100644 --- a/stubs/networkx/convert_matrix.pyi +++ b/stubs/networkx/convert_matrix.pyi @@ -1,12 +1,8 @@ -import itertools -import warnings -from collections import defaultdict from typing import Callable, Literal from numpy.typing import ArrayLike from .classes.graph import Graph -from .utils import not_implemented_for __all__ = [ "from_numpy_matrix", diff --git a/stubs/networkx/drawing/nx_agraph.pyi b/stubs/networkx/drawing/nx_agraph.pyi index 4c31092b..6b5daf7f 100644 --- a/stubs/networkx/drawing/nx_agraph.pyi +++ b/stubs/networkx/drawing/nx_agraph.pyi @@ -1,5 +1,3 @@ -import os -import tempfile from typing import Callable, Mapping from ..classes.graph import Graph diff --git a/stubs/networkx/drawing/nx_pydot.pyi b/stubs/networkx/drawing/nx_pydot.pyi index 9c1f5f40..34f5e892 100644 --- a/stubs/networkx/drawing/nx_pydot.pyi +++ b/stubs/networkx/drawing/nx_pydot.pyi @@ -1,11 +1,8 @@ -import warnings -from locale import getpreferredencoding from typing import Mapping from ..classes.graph import Graph from ..classes.multidigraph import MultiDiGraph from ..classes.multigraph import MultiGraph -from ..utils import open_file __all__ = [ "write_dot", diff --git a/stubs/networkx/drawing/nx_pylab.pyi b/stubs/networkx/drawing/nx_pylab.pyi index fcd12935..21357e9d 100644 --- a/stubs/networkx/drawing/nx_pylab.pyi +++ b/stubs/networkx/drawing/nx_pylab.pyi @@ -1,18 +1,8 @@ -from numbers import Number from typing import Mapping from numpy.typing import ArrayLike from ..classes.graph import Graph -from ..drawing.layout import ( - circular_layout, - kamada_kawai_layout, - planar_layout, - random_layout, - shell_layout, - spectral_layout, - spring_layout, -) __all__ = [ "draw", diff --git a/stubs/networkx/generators/atlas.pyi b/stubs/networkx/generators/atlas.pyi index 126444ad..4c0958f3 100644 --- a/stubs/networkx/generators/atlas.pyi +++ b/stubs/networkx/generators/atlas.pyi @@ -1,12 +1,6 @@ -import gzip -import os -import os.path -from itertools import islice from numpy.typing import ArrayLike -from ..classes.graph import Graph - __all__ = ["graph_atlas", "graph_atlas_g"] #: The total number of graphs in the atlas. diff --git a/stubs/networkx/generators/classic.pyi b/stubs/networkx/generators/classic.pyi index d4bc7451..2f88d4cd 100644 --- a/stubs/networkx/generators/classic.pyi +++ b/stubs/networkx/generators/classic.pyi @@ -1,11 +1,6 @@ -import itertools -import numbers from collections.abc import Iterable -from ..classes import Graph -from ..classes.graph import Graph -from ..exception import NetworkXError -from ..utils import nodes_or_number, pairwise +from ..utils import nodes_or_number __all__ = [ "balanced_tree", diff --git a/stubs/networkx/generators/cographs.pyi b/stubs/networkx/generators/cographs.pyi index 983d4473..21e4e00e 100644 --- a/stubs/networkx/generators/cographs.pyi +++ b/stubs/networkx/generators/cographs.pyi @@ -1,4 +1,3 @@ -from ..classes.graph import Graph from ..utils import py_random_state __all__ = ["random_cograph"] diff --git a/stubs/networkx/generators/community.pyi b/stubs/networkx/generators/community.pyi index e12cfe6f..87acec7a 100644 --- a/stubs/networkx/generators/community.pyi +++ b/stubs/networkx/generators/community.pyi @@ -1,9 +1,6 @@ -import itertools -import math from numpy.typing import ArrayLike -from ..classes.graph import Graph from ..utils import py_random_state __all__ = [ diff --git a/stubs/networkx/generators/degree_seq.pyi b/stubs/networkx/generators/degree_seq.pyi index fa7bb9a5..23719e04 100644 --- a/stubs/networkx/generators/degree_seq.pyi +++ b/stubs/networkx/generators/degree_seq.pyi @@ -1,7 +1,3 @@ -import heapq -import math -from itertools import chain, combinations, zip_longest -from operator import itemgetter from numpy.typing import ArrayLike @@ -9,7 +5,7 @@ from ..classes.digraph import DiGraph from ..classes.graph import Graph from ..classes.multidigraph import MultiDiGraph from ..classes.multigraph import MultiGraph -from ..utils import py_random_state, random_weighted_sample +from ..utils import py_random_state __all__ = [ "configuration_model", diff --git a/stubs/networkx/generators/directed.pyi b/stubs/networkx/generators/directed.pyi index 1f7a5120..90805596 100644 --- a/stubs/networkx/generators/directed.pyi +++ b/stubs/networkx/generators/directed.pyi @@ -1,10 +1,6 @@ -import numbers -from collections import Counter from ..classes import MultiDiGraph -from ..classes.graph import Graph -from ..generators.classic import empty_graph -from ..utils import discrete_sequence, py_random_state, weighted_choice +from ..utils import py_random_state __all__ = [ "gn_graph", diff --git a/stubs/networkx/generators/duplication.pyi b/stubs/networkx/generators/duplication.pyi index 84189998..ce64a9df 100644 --- a/stubs/networkx/generators/duplication.pyi +++ b/stubs/networkx/generators/duplication.pyi @@ -1,5 +1,4 @@ from ..classes.graph import Graph -from ..exception import NetworkXError from ..utils import py_random_state __all__ = ["partial_duplication_graph", "duplication_divergence_graph"] diff --git a/stubs/networkx/generators/expanders.pyi b/stubs/networkx/generators/expanders.pyi index ab0f75da..3c8e6c69 100644 --- a/stubs/networkx/generators/expanders.pyi +++ b/stubs/networkx/generators/expanders.pyi @@ -1,6 +1,4 @@ -import itertools -from ..classes.graph import Graph __all__ = ["margulis_gabber_galil_graph", "chordal_cycle_graph", "paley_graph"] diff --git a/stubs/networkx/generators/geometric.pyi b/stubs/networkx/generators/geometric.pyi index dd8e3ca5..081baaaa 100644 --- a/stubs/networkx/generators/geometric.pyi +++ b/stubs/networkx/generators/geometric.pyi @@ -1,7 +1,4 @@ -import math -from bisect import bisect_left from collections.abc import Iterable -from itertools import accumulate, combinations, product from typing import Mapping from numpy.typing import ArrayLike diff --git a/stubs/networkx/generators/harary_graph.pyi b/stubs/networkx/generators/harary_graph.pyi index 056bd8f6..6b73421a 100644 --- a/stubs/networkx/generators/harary_graph.pyi +++ b/stubs/networkx/generators/harary_graph.pyi @@ -1,5 +1,3 @@ -from ..classes.graph import Graph -from ..exception import NetworkXError __all__ = ["hnm_harary_graph", "hkn_harary_graph"] diff --git a/stubs/networkx/generators/internet_as_graphs.pyi b/stubs/networkx/generators/internet_as_graphs.pyi index a8ccd6cc..cfea11eb 100644 --- a/stubs/networkx/generators/internet_as_graphs.pyi +++ b/stubs/networkx/generators/internet_as_graphs.pyi @@ -1,6 +1,5 @@ from typing import Any, Mapping -from ..classes.graph import Graph from ..utils import py_random_state __all__ = ["random_internet_as_graph"] diff --git a/stubs/networkx/generators/intersection.pyi b/stubs/networkx/generators/intersection.pyi index 465fe46e..d2d0651e 100644 --- a/stubs/networkx/generators/intersection.pyi +++ b/stubs/networkx/generators/intersection.pyi @@ -1,4 +1,3 @@ -from ..classes.graph import Graph from ..utils import py_random_state __all__ = [ diff --git a/stubs/networkx/generators/interval_graph.pyi b/stubs/networkx/generators/interval_graph.pyi index 03706b2a..03c5b80a 100644 --- a/stubs/networkx/generators/interval_graph.pyi +++ b/stubs/networkx/generators/interval_graph.pyi @@ -1,6 +1,4 @@ -from collections.abc import Sequence -from ..classes.graph import Graph __all__ = ["interval_graph"] diff --git a/stubs/networkx/generators/lattice.pyi b/stubs/networkx/generators/lattice.pyi index d652b655..93c76e2a 100644 --- a/stubs/networkx/generators/lattice.pyi +++ b/stubs/networkx/generators/lattice.pyi @@ -1,12 +1,4 @@ from collections.abc import Iterable -from itertools import repeat -from math import sqrt - -from ..classes import set_node_attributes -from ..exception import NetworkXError -from ..generators.classic import cycle_graph, empty_graph, path_graph -from ..relabel import relabel_nodes -from ..utils import flatten, nodes_or_number, pairwise __all__ = [ "grid_2d_graph", diff --git a/stubs/networkx/generators/line.pyi b/stubs/networkx/generators/line.pyi index 0806dc39..0f30821d 100644 --- a/stubs/networkx/generators/line.pyi +++ b/stubs/networkx/generators/line.pyi @@ -1,10 +1,5 @@ -from collections import defaultdict -from functools import partial -from itertools import combinations from ..classes.graph import Graph -from ..utils import arbitrary_element -from ..utils.decorators import not_implemented_for __all__ = ["line_graph", "inverse_line_graph"] diff --git a/stubs/networkx/generators/mycielski.pyi b/stubs/networkx/generators/mycielski.pyi index 5f2a507c..c3e4973f 100644 --- a/stubs/networkx/generators/mycielski.pyi +++ b/stubs/networkx/generators/mycielski.pyi @@ -1,5 +1,4 @@ from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = ["mycielskian", "mycielski_graph"] diff --git a/stubs/networkx/generators/nonisomorphic_trees.pyi b/stubs/networkx/generators/nonisomorphic_trees.pyi index 458943af..551d3f00 100644 --- a/stubs/networkx/generators/nonisomorphic_trees.pyi +++ b/stubs/networkx/generators/nonisomorphic_trees.pyi @@ -1,6 +1,5 @@ __all__ = ["nonisomorphic_trees", "number_of_nonisomorphic_trees"] -from ..classes.graph import Graph def nonisomorphic_trees(order: int, create="graph"): ... def number_of_nonisomorphic_trees(order: int): ... diff --git a/stubs/networkx/generators/random_clustered.pyi b/stubs/networkx/generators/random_clustered.pyi index f1dc966b..1dc4f98f 100644 --- a/stubs/networkx/generators/random_clustered.pyi +++ b/stubs/networkx/generators/random_clustered.pyi @@ -1,4 +1,3 @@ -from ..classes.graph import Graph from ..classes.multigraph import MultiGraph from ..utils import py_random_state diff --git a/stubs/networkx/generators/random_graphs.pyi b/stubs/networkx/generators/random_graphs.pyi index 4b93dc1a..4c0794b1 100644 --- a/stubs/networkx/generators/random_graphs.pyi +++ b/stubs/networkx/generators/random_graphs.pyi @@ -1,11 +1,6 @@ -import itertools -import math -from collections import defaultdict from ..classes.graph import Graph from ..utils import py_random_state -from .classic import complete_graph, empty_graph, path_graph, star_graph -from .degree_seq import degree_sequence_tree __all__ = [ "fast_gnp_random_graph", diff --git a/stubs/networkx/generators/small.pyi b/stubs/networkx/generators/small.pyi index 259b66ba..31b2aace 100644 --- a/stubs/networkx/generators/small.pyi +++ b/stubs/networkx/generators/small.pyi @@ -25,11 +25,7 @@ __all__ = [ "tutte_graph", ] -from functools import wraps -from ..classes.graph import Graph -from ..exception import NetworkXError -from ..generators.classic import complete_graph, cycle_graph, empty_graph, path_graph def make_small_undirected_graph(graph_description, create_using=None): ... def make_small_graph(graph_description, create_using=None): ... diff --git a/stubs/networkx/generators/social.pyi b/stubs/networkx/generators/social.pyi index 328249ff..bdb34c06 100644 --- a/stubs/networkx/generators/social.pyi +++ b/stubs/networkx/generators/social.pyi @@ -1,4 +1,3 @@ -from ..classes.graph import Graph __all__ = [ "karate_club_graph", diff --git a/stubs/networkx/generators/stochastic.pyi b/stubs/networkx/generators/stochastic.pyi index 99c93644..c299e1b0 100644 --- a/stubs/networkx/generators/stochastic.pyi +++ b/stubs/networkx/generators/stochastic.pyi @@ -1,6 +1,4 @@ -from ..classes import DiGraph, MultiDiGraph from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = ["stochastic_graph"] diff --git a/stubs/networkx/generators/sudoku.pyi b/stubs/networkx/generators/sudoku.pyi index fd55ec2d..1a4bfe5b 100644 --- a/stubs/networkx/generators/sudoku.pyi +++ b/stubs/networkx/generators/sudoku.pyi @@ -1,5 +1,3 @@ -from ..classes.graph import Graph -from ..exception import NetworkXError __all__ = ["sudoku_graph"] diff --git a/stubs/networkx/generators/trees.pyi b/stubs/networkx/generators/trees.pyi index de7beb4d..99b478a5 100644 --- a/stubs/networkx/generators/trees.pyi +++ b/stubs/networkx/generators/trees.pyi @@ -1,7 +1,5 @@ -from collections import defaultdict from ..classes.digraph import DiGraph -from ..classes.graph import Graph from ..utils import py_random_state __all__ = ["prefix_tree", "random_tree", "prefix_tree_recursive"] diff --git a/stubs/networkx/lazy_imports.pyi b/stubs/networkx/lazy_imports.pyi index e3df3c67..b8db1d5d 100644 --- a/stubs/networkx/lazy_imports.pyi +++ b/stubs/networkx/lazy_imports.pyi @@ -1,8 +1,3 @@ -import importlib -import importlib.util -import inspect -import os -import sys import types from typing import Mapping diff --git a/stubs/networkx/linalg/algebraicconnectivity.pyi b/stubs/networkx/linalg/algebraicconnectivity.pyi index 3b8d61f4..410a6b37 100644 --- a/stubs/networkx/linalg/algebraicconnectivity.pyi +++ b/stubs/networkx/linalg/algebraicconnectivity.pyi @@ -1,7 +1,6 @@ -from functools import partial from ..classes.graph import Graph -from ..utils import not_implemented_for, np_random_state, reverse_cuthill_mckee_ordering +from ..utils import np_random_state __all__ = ["algebraic_connectivity", "fiedler_vector", "spectral_ordering"] diff --git a/stubs/networkx/linalg/bethehessianmatrix.pyi b/stubs/networkx/linalg/bethehessianmatrix.pyi index 01abf4c8..a67329c2 100644 --- a/stubs/networkx/linalg/bethehessianmatrix.pyi +++ b/stubs/networkx/linalg/bethehessianmatrix.pyi @@ -1,7 +1,6 @@ from numpy.typing import ArrayLike from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = ["bethe_hessian_matrix"] diff --git a/stubs/networkx/linalg/laplacianmatrix.pyi b/stubs/networkx/linalg/laplacianmatrix.pyi index ca3a2a7a..ebdd5a32 100644 --- a/stubs/networkx/linalg/laplacianmatrix.pyi +++ b/stubs/networkx/linalg/laplacianmatrix.pyi @@ -2,7 +2,6 @@ from numpy.typing import ArrayLike from ..classes.digraph import DiGraph from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = [ "laplacian_matrix", diff --git a/stubs/networkx/linalg/modularitymatrix.pyi b/stubs/networkx/linalg/modularitymatrix.pyi index cd75f9e2..e84f3608 100644 --- a/stubs/networkx/linalg/modularitymatrix.pyi +++ b/stubs/networkx/linalg/modularitymatrix.pyi @@ -2,7 +2,6 @@ from numpy.typing import ArrayLike from ..classes.digraph import DiGraph from ..classes.graph import Graph -from ..utils import not_implemented_for __all__ = ["modularity_matrix", "directed_modularity_matrix"] diff --git a/stubs/networkx/readwrite/adjlist.pyi b/stubs/networkx/readwrite/adjlist.pyi index 959a9b24..9854eb4a 100644 --- a/stubs/networkx/readwrite/adjlist.pyi +++ b/stubs/networkx/readwrite/adjlist.pyi @@ -1,7 +1,6 @@ __all__ = ["generate_adjlist", "write_adjlist", "parse_adjlist", "read_adjlist"] from ..classes.graph import Graph -from ..utils import open_file def generate_adjlist(G: Graph, delimiter: str = " ") -> str: ... def write_adjlist(G: Graph, path, comments: str = "#", delimiter: str = " ", encoding: str = "utf-8"): ... diff --git a/stubs/networkx/readwrite/edgelist.pyi b/stubs/networkx/readwrite/edgelist.pyi index d95f49b1..89f9394c 100644 --- a/stubs/networkx/readwrite/edgelist.pyi +++ b/stubs/networkx/readwrite/edgelist.pyi @@ -10,7 +10,6 @@ __all__ = [ ] from ..classes.graph import Graph -from ..utils import open_file def generate_edgelist(G: Graph, delimiter: str = " ", data=True) -> str: ... def write_edgelist( diff --git a/stubs/networkx/readwrite/gexf.pyi b/stubs/networkx/readwrite/gexf.pyi index 391a2caf..d555a83e 100644 --- a/stubs/networkx/readwrite/gexf.pyi +++ b/stubs/networkx/readwrite/gexf.pyi @@ -1,9 +1,5 @@ -import itertools -import time -from xml.etree.ElementTree import Element, ElementTree, SubElement, register_namespace, tostring from ..classes.graph import Graph -from ..utils import open_file __all__ = ["write_gexf", "read_gexf", "relabel_gexf_graph", "generate_gexf"] diff --git a/stubs/networkx/readwrite/gml.pyi b/stubs/networkx/readwrite/gml.pyi index 961f1c9d..1aba0d32 100644 --- a/stubs/networkx/readwrite/gml.pyi +++ b/stubs/networkx/readwrite/gml.pyi @@ -1,16 +1,8 @@ -import html.entities as htmlentitydefs -import re -import warnings -from ast import literal_eval -from collections import defaultdict from collections.abc import Iterable from enum import Enum -from io import StringIO from typing import Any, Callable, NamedTuple from ..classes.graph import Graph -from ..exception import NetworkXError -from ..utils import open_file __all__ = ["read_gml", "parse_gml", "generate_gml", "write_gml"] diff --git a/stubs/networkx/readwrite/gpickle.pyi b/stubs/networkx/readwrite/gpickle.pyi index 21e8e37d..0a73cc29 100644 --- a/stubs/networkx/readwrite/gpickle.pyi +++ b/stubs/networkx/readwrite/gpickle.pyi @@ -1,10 +1,7 @@ __all__ = ["read_gpickle", "write_gpickle"] -import pickle -import warnings from ..classes.graph import Graph -from ..utils import open_file def write_gpickle(G: Graph, path, protocol=...): ... def read_gpickle(path): ... diff --git a/stubs/networkx/readwrite/graph6.pyi b/stubs/networkx/readwrite/graph6.pyi index 84efab5f..ac31c6dc 100644 --- a/stubs/networkx/readwrite/graph6.pyi +++ b/stubs/networkx/readwrite/graph6.pyi @@ -2,13 +2,9 @@ from collections.abc import Iterable # Original author: D. Eppstein, UC Irvine, August 12, 2003. # The original code at http://www.ics.uci.edu/~eppstein/PADS/ is public domain. -from itertools import islice - from numpy.typing import ArrayLike from ..classes.graph import Graph -from ..exception import NetworkXError -from ..utils import not_implemented_for, open_file __all__ = ["from_graph6_bytes", "read_graph6", "to_graph6_bytes", "write_graph6"] diff --git a/stubs/networkx/readwrite/graphml.pyi b/stubs/networkx/readwrite/graphml.pyi index 81e6c0af..22407b9a 100644 --- a/stubs/networkx/readwrite/graphml.pyi +++ b/stubs/networkx/readwrite/graphml.pyi @@ -1,8 +1,5 @@ -import warnings -from collections import defaultdict from ..classes.graph import Graph -from ..utils import open_file __all__ = [ "write_graphml", diff --git a/stubs/networkx/readwrite/json_graph/adjacency.pyi b/stubs/networkx/readwrite/json_graph/adjacency.pyi index 4a32caae..99b1d0fb 100644 --- a/stubs/networkx/readwrite/json_graph/adjacency.pyi +++ b/stubs/networkx/readwrite/json_graph/adjacency.pyi @@ -1,4 +1,3 @@ -from itertools import chain from typing import Mapping from ...classes.graph import Graph diff --git a/stubs/networkx/readwrite/json_graph/jit.pyi b/stubs/networkx/readwrite/json_graph/jit.pyi index 604abd0b..375dd3ed 100644 --- a/stubs/networkx/readwrite/json_graph/jit.pyi +++ b/stubs/networkx/readwrite/json_graph/jit.pyi @@ -1,8 +1,5 @@ -import json -import warnings from ...classes.graph import Graph -from ...utils.decorators import not_implemented_for __all__ = ["jit_graph", "jit_data"] diff --git a/stubs/networkx/readwrite/json_graph/node_link.pyi b/stubs/networkx/readwrite/json_graph/node_link.pyi index f564d36a..c89e79cc 100644 --- a/stubs/networkx/readwrite/json_graph/node_link.pyi +++ b/stubs/networkx/readwrite/json_graph/node_link.pyi @@ -1,4 +1,3 @@ -from itertools import chain, count from typing import Mapping from ...classes.graph import Graph diff --git a/stubs/networkx/readwrite/json_graph/tree.pyi b/stubs/networkx/readwrite/json_graph/tree.pyi index 665370a3..1e887243 100644 --- a/stubs/networkx/readwrite/json_graph/tree.pyi +++ b/stubs/networkx/readwrite/json_graph/tree.pyi @@ -1,4 +1,3 @@ -from itertools import chain from typing import Mapping from ...classes.graph import Graph diff --git a/stubs/networkx/readwrite/leda.pyi b/stubs/networkx/readwrite/leda.pyi index 8465714f..6db8f4f1 100644 --- a/stubs/networkx/readwrite/leda.pyi +++ b/stubs/networkx/readwrite/leda.pyi @@ -5,9 +5,6 @@ from collections.abc import Iterable __all__ = ["read_leda", "parse_leda"] -from ..classes.graph import Graph -from ..exception import NetworkXError -from ..utils import open_file def read_leda(path, encoding="UTF-8"): ... def parse_leda(lines: str | Iterable): ... diff --git a/stubs/networkx/readwrite/multiline_adjlist.pyi b/stubs/networkx/readwrite/multiline_adjlist.pyi index c6ee18ae..07de2a67 100644 --- a/stubs/networkx/readwrite/multiline_adjlist.pyi +++ b/stubs/networkx/readwrite/multiline_adjlist.pyi @@ -6,7 +6,6 @@ __all__ = [ ] from ..classes.graph import Graph -from ..utils import open_file def generate_multiline_adjlist(G: Graph, delimiter: str = " ") -> str: ... def write_multiline_adjlist(G: Graph, path, delimiter: str = " ", comments: str = "#", encoding: str = "utf-8"): ... diff --git a/stubs/networkx/readwrite/nx_shp.pyi b/stubs/networkx/readwrite/nx_shp.pyi index 36cbcf46..d5b620e9 100644 --- a/stubs/networkx/readwrite/nx_shp.pyi +++ b/stubs/networkx/readwrite/nx_shp.pyi @@ -1,4 +1,3 @@ -import warnings from ..classes.graph import Graph diff --git a/stubs/networkx/readwrite/p2g.pyi b/stubs/networkx/readwrite/p2g.pyi index 54b9141d..7e309245 100644 --- a/stubs/networkx/readwrite/p2g.pyi +++ b/stubs/networkx/readwrite/p2g.pyi @@ -1,8 +1,6 @@ -import networkx from ..classes.graph import Graph from ..classes.multidigraph import MultiDiGraph -from ..utils import open_file def write_p2g(G: Graph, path, encoding="utf-8"): ... def read_p2g(path, encoding="utf-8") -> MultiDiGraph: ... diff --git a/stubs/networkx/readwrite/pajek.pyi b/stubs/networkx/readwrite/pajek.pyi index b4636035..c0689888 100644 --- a/stubs/networkx/readwrite/pajek.pyi +++ b/stubs/networkx/readwrite/pajek.pyi @@ -1,8 +1,6 @@ -import warnings from collections.abc import Iterable from ..classes.graph import Graph -from ..utils import open_file __all__ = ["read_pajek", "parse_pajek", "generate_pajek", "write_pajek"] diff --git a/stubs/networkx/readwrite/sparse6.pyi b/stubs/networkx/readwrite/sparse6.pyi index 1efae49c..a945f248 100644 --- a/stubs/networkx/readwrite/sparse6.pyi +++ b/stubs/networkx/readwrite/sparse6.pyi @@ -5,9 +5,6 @@ from numpy.typing import ArrayLike # Original author: D. Eppstein, UC Irvine, August 12, 2003. # The original code at https://www.ics.uci.edu/~eppstein/PADS/ is public domain. from ..classes.graph import Graph -from ..exception import NetworkXError -from ..readwrite.graph6 import data_to_n, n_to_data -from ..utils import not_implemented_for, open_file __all__ = ["from_sparse6_bytes", "read_sparse6", "to_sparse6_bytes", "write_sparse6"] diff --git a/stubs/networkx/testing/test.pyi b/stubs/networkx/testing/test.pyi index 13702b01..e22e07fa 100644 --- a/stubs/networkx/testing/test.pyi +++ b/stubs/networkx/testing/test.pyi @@ -1,3 +1,2 @@ -import warnings def run(verbosity=1, doctest: bool = False): ... diff --git a/stubs/networkx/testing/utils.pyi b/stubs/networkx/testing/utils.pyi index a0d47669..b534db93 100644 --- a/stubs/networkx/testing/utils.pyi +++ b/stubs/networkx/testing/utils.pyi @@ -1,6 +1,4 @@ -import warnings -from ..utils import edges_equal, graphs_equal, nodes_equal __all__ = [ "assert_nodes_equal", diff --git a/stubs/networkx/utils/contextmanagers.pyi b/stubs/networkx/utils/contextmanagers.pyi index 48a55096..5891c943 100644 --- a/stubs/networkx/utils/contextmanagers.pyi +++ b/stubs/networkx/utils/contextmanagers.pyi @@ -1,4 +1,3 @@ -import warnings from contextlib import contextmanager from ..classes.graph import Graph diff --git a/stubs/networkx/utils/decorators.pyi b/stubs/networkx/utils/decorators.pyi index 621f2b4a..56f30f62 100644 --- a/stubs/networkx/utils/decorators.pyi +++ b/stubs/networkx/utils/decorators.pyi @@ -1,18 +1,5 @@ -import bz2 -import collections -import gzip -import inspect -import itertools -import re -from collections import defaultdict -from contextlib import contextmanager -from os.path import splitext -from pathlib import Path from typing import Callable, Sequence -from ..classes.graph import Graph -from ..utils import create_py_random_state, create_random_state - __all__ = [ "not_implemented_for", "open_file", diff --git a/stubs/networkx/utils/heaps.pyi b/stubs/networkx/utils/heaps.pyi index a3162eb0..d82b4d10 100644 --- a/stubs/networkx/utils/heaps.pyi +++ b/stubs/networkx/utils/heaps.pyi @@ -1,9 +1,5 @@ -from heapq import heappop, heappush -from itertools import count from typing import Any -from ..classes.graph import Graph - __all__ = ["MinHeap", "PairingHeap", "BinaryHeap"] class MinHeap: diff --git a/stubs/networkx/utils/mapped_queue.pyi b/stubs/networkx/utils/mapped_queue.pyi index 6bfe95ba..6c5cdc38 100644 --- a/stubs/networkx/utils/mapped_queue.pyi +++ b/stubs/networkx/utils/mapped_queue.pyi @@ -1,4 +1,3 @@ -import heapq __all__ = ["MappedQueue"] diff --git a/stubs/networkx/utils/misc.pyi b/stubs/networkx/utils/misc.pyi index 9cb666fa..8ccbe637 100644 --- a/stubs/networkx/utils/misc.pyi +++ b/stubs/networkx/utils/misc.pyi @@ -1,11 +1,4 @@ -import sys -import uuid -import warnings -from collections import defaultdict, deque -from collections.abc import Iterable, Iterator, Sized -from itertools import chain, tee -from ..classes.graph import Graph __all__ = [ "is_string_like", diff --git a/stubs/networkx/utils/random_sequence.pyi b/stubs/networkx/utils/random_sequence.pyi index 98ce4a88..7f8528fc 100644 --- a/stubs/networkx/utils/random_sequence.pyi +++ b/stubs/networkx/utils/random_sequence.pyi @@ -1,4 +1,3 @@ -from ..classes.graph import Graph from ..utils import py_random_state __all__ = [ diff --git a/stubs/networkx/utils/rcm.pyi b/stubs/networkx/utils/rcm.pyi index e60a44bd..a6f9883e 100644 --- a/stubs/networkx/utils/rcm.pyi +++ b/stubs/networkx/utils/rcm.pyi @@ -1,8 +1,5 @@ -from collections import deque -from operator import itemgetter from ..classes.graph import Graph -from ..utils import arbitrary_element __all__ = ["cuthill_mckee_ordering", "reverse_cuthill_mckee_ordering"] diff --git a/stubs/networkx/utils/union_find.pyi b/stubs/networkx/utils/union_find.pyi index 68d753e1..d1171353 100644 --- a/stubs/networkx/utils/union_find.pyi +++ b/stubs/networkx/utils/union_find.pyi @@ -1,4 +1,3 @@ -from ..utils import groups class UnionFind: def __init__(self, elements=None): ... diff --git a/stubs/skimage/_shared/_dependency_checks.pyi b/stubs/skimage/_shared/_dependency_checks.pyi index 02bfda08..890b34dd 100644 --- a/stubs/skimage/_shared/_dependency_checks.pyi +++ b/stubs/skimage/_shared/_dependency_checks.pyi @@ -1,3 +1,2 @@ -from .version_requirements import is_installed has_mpl = ... diff --git a/stubs/skimage/_shared/_geometry.pyi b/stubs/skimage/_shared/_geometry.pyi index 03a3ca2b..1b3ec487 100644 --- a/stubs/skimage/_shared/_geometry.pyi +++ b/stubs/skimage/_shared/_geometry.pyi @@ -1,6 +1,5 @@ __all__ = ["polygon_clip", "polygon_area"] -import numpy as np from .version_requirements import require diff --git a/stubs/skimage/_shared/_tempfile.pyi b/stubs/skimage/_shared/_tempfile.pyi index d328907b..ef7b7dee 100644 --- a/stubs/skimage/_shared/_tempfile.pyi +++ b/stubs/skimage/_shared/_tempfile.pyi @@ -1,6 +1,4 @@ -import os from contextlib import contextmanager -from tempfile import NamedTemporaryFile @contextmanager def temporary_file(suffix: str = ""): ... diff --git a/stubs/skimage/_shared/_warnings.pyi b/stubs/skimage/_shared/_warnings.pyi index 1255b016..83d85954 100644 --- a/stubs/skimage/_shared/_warnings.pyi +++ b/stubs/skimage/_shared/_warnings.pyi @@ -1,8 +1,3 @@ -import functools -import os -import re -import sys -import warnings from contextlib import contextmanager __all__ = ["all_warnings", "expected_warnings", "warn"] diff --git a/stubs/skimage/_shared/coord.pyi b/stubs/skimage/_shared/coord.pyi index 4fb6bb13..006137ee 100644 --- a/stubs/skimage/_shared/coord.pyi +++ b/stubs/skimage/_shared/coord.pyi @@ -1,5 +1,3 @@ -import numpy as np -from scipy.spatial import distance def _ensure_spacing(coord, spacing, p_norm, max_out): ... def ensure_spacing( diff --git a/stubs/skimage/_shared/filters.pyi b/stubs/skimage/_shared/filters.pyi index 86044ed1..e327531b 100644 --- a/stubs/skimage/_shared/filters.pyi +++ b/stubs/skimage/_shared/filters.pyi @@ -1,13 +1,9 @@ -from collections.abc import Iterable from typing import Literal -import numpy as np from numpy.typing import ArrayLike, NDArray -from scipy import ndimage as ndi 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/_shared/lazy.pyi b/stubs/skimage/_shared/lazy.pyi index 5e03b583..2cb060d2 100644 --- a/stubs/skimage/_shared/lazy.pyi +++ b/stubs/skimage/_shared/lazy.pyi @@ -1,7 +1,3 @@ -import importlib -import importlib.util -import os -import sys from typing import Mapping def attach( diff --git a/stubs/skimage/_shared/setup.pyi b/stubs/skimage/_shared/setup.pyi index ae1561c5..8f1aecbd 100644 --- a/stubs/skimage/_shared/setup.pyi +++ b/stubs/skimage/_shared/setup.pyi @@ -1,6 +1,5 @@ #!/usr/bin/env python -import os base_path = ... diff --git a/stubs/skimage/_shared/tester.pyi b/stubs/skimage/_shared/tester.pyi index 5d2e45c7..a35cdb94 100644 --- a/stubs/skimage/_shared/tester.pyi +++ b/stubs/skimage/_shared/tester.pyi @@ -1,5 +1,3 @@ -import os -import sys from typing import Literal from numpy.typing import ArrayLike diff --git a/stubs/skimage/_shared/testing.pyi b/stubs/skimage/_shared/testing.pyi index 5fd0c21b..7ea9f4c7 100644 --- a/stubs/skimage/_shared/testing.pyi +++ b/stubs/skimage/_shared/testing.pyi @@ -1,31 +1,6 @@ -import functools -import os -import re -import struct -import threading -import warnings -from tempfile import NamedTemporaryFile -import numpy as np -from numpy import testing -from numpy.testing import ( - TestCase, - assert_, - assert_allclose, - assert_almost_equal, - assert_array_almost_equal, - assert_array_almost_equal_nulp, - assert_array_equal, - assert_array_less, - assert_equal, - assert_no_warnings, - assert_warns, -) from numpy.typing import ArrayLike -from ..data._fetchers import _fetch -from ._warnings import expected_warnings - SKIP_RE = ... skipif = ... diff --git a/stubs/skimage/_shared/utils.pyi b/stubs/skimage/_shared/utils.pyi index df32496a..5cd405f6 100644 --- a/stubs/skimage/_shared/utils.pyi +++ b/stubs/skimage/_shared/utils.pyi @@ -1,13 +1,6 @@ -import functools -import inspect -import sys -import warnings from collections.abc import Iterable from typing import Any, Literal, Mapping -import numpy as np -import scipy -from numpy.lib import NumpyVersion from numpy.typing import ArrayLike, NDArray from ._warnings import all_warnings, warn diff --git a/stubs/skimage/_shared/version_requirements.pyi b/stubs/skimage/_shared/version_requirements.pyi index db580c1d..64a33edf 100644 --- a/stubs/skimage/_shared/version_requirements.pyi +++ b/stubs/skimage/_shared/version_requirements.pyi @@ -1,6 +1,4 @@ -import sys -from packaging import version as _version def ensure_python_version(min_version): ... def _check_version(actver, version, cmp_op): ... diff --git a/stubs/skimage/data/_binary_blobs.pyi b/stubs/skimage/data/_binary_blobs.pyi index 4f8eb819..3f8e612e 100644 --- a/stubs/skimage/data/_binary_blobs.pyi +++ b/stubs/skimage/data/_binary_blobs.pyi @@ -1,8 +1,5 @@ -import numpy as np from numpy.typing import NDArray -from .._shared.filters import gaussian - def binary_blobs( length: int = 512, blob_size_fraction: float = 0.1, diff --git a/stubs/skimage/data/_fetchers.pyi b/stubs/skimage/data/_fetchers.pyi index 52416fb9..da85d3b6 100644 --- a/stubs/skimage/data/_fetchers.pyi +++ b/stubs/skimage/data/_fetchers.pyi @@ -1,14 +1,5 @@ -import os -import os.path as osp -import shutil from os import PathLike -import numpy as np -from packaging import version - -from .. import __version__ -from ._registry import legacy_registry, registry, registry_urls - legacy_data_dir = ... skimage_distribution_dir = ... diff --git a/stubs/skimage/draw/_polygon2mask.pyi b/stubs/skimage/draw/_polygon2mask.pyi index 7d1bf287..fe4aaa0f 100644 --- a/stubs/skimage/draw/_polygon2mask.pyi +++ b/stubs/skimage/draw/_polygon2mask.pyi @@ -1,5 +1,3 @@ -import numpy as np -from . import draw def polygon2mask(image_shape, polygon): ... diff --git a/stubs/skimage/draw/_random_shapes.pyi b/stubs/skimage/draw/_random_shapes.pyi index 03c6f41f..cc1655ad 100644 --- a/stubs/skimage/draw/_random_shapes.pyi +++ b/stubs/skimage/draw/_random_shapes.pyi @@ -1,9 +1,6 @@ -import math -import numpy as np -from .._shared.utils import deprecate_multichannel_kwarg, warn -from . import disk as draw_disk, ellipse as draw_ellipse, polygon as draw_polygon +from .._shared.utils import deprecate_multichannel_kwarg def _generate_rectangle_mask(point, image, shape, random): ... def _generate_circle_mask(point, image, shape, random): ... diff --git a/stubs/skimage/draw/draw.pyi b/stubs/skimage/draw/draw.pyi index c4ccc130..d5081f30 100644 --- a/stubs/skimage/draw/draw.pyi +++ b/stubs/skimage/draw/draw.pyi @@ -1,9 +1,7 @@ from typing import Literal -import numpy as np from numpy.typing import NDArray -from .._shared._geometry import polygon_clip from .._shared.version_requirements import require def _ellipse_in_shape(shape, center, radii, rotation=0.0): ... diff --git a/stubs/skimage/draw/draw3d.pyi b/stubs/skimage/draw/draw3d.pyi index fec24823..b710a874 100644 --- a/stubs/skimage/draw/draw3d.pyi +++ b/stubs/skimage/draw/draw3d.pyi @@ -1,5 +1,3 @@ -import numpy as np -from scipy.special import ellipeinc as ellip_E, ellipkinc as ellip_F def ellipsoid(a: float, b: float, c: float, spacing=..., levelset: bool = False): ... def ellipsoid_stats(a: float, b: float, c: float) -> tuple[float, float]: ... diff --git a/stubs/skimage/draw/draw_nd.pyi b/stubs/skimage/draw/draw_nd.pyi index 6d14e4f7..28a3b933 100644 --- a/stubs/skimage/draw/draw_nd.pyi +++ b/stubs/skimage/draw/draw_nd.pyi @@ -1,4 +1,3 @@ -import numpy as np def _round_safe(coords): ... def line_nd(start, stop, *, endpoint: bool = False, integer: bool = True): ... diff --git a/stubs/skimage/draw/setup.pyi b/stubs/skimage/draw/setup.pyi index ae1561c5..8f1aecbd 100644 --- a/stubs/skimage/draw/setup.pyi +++ b/stubs/skimage/draw/setup.pyi @@ -1,6 +1,5 @@ #!/usr/bin/env python -import os base_path = ... diff --git a/stubs/skimage/feature/_basic_features.pyi b/stubs/skimage/feature/_basic_features.pyi index 32fc5d7b..55466c19 100644 --- a/stubs/skimage/feature/_basic_features.pyi +++ b/stubs/skimage/feature/_basic_features.pyi @@ -1,8 +1,4 @@ -import itertools -from concurrent.futures import ThreadPoolExecutor -from itertools import combinations_with_replacement -import numpy as np from numpy.typing import NDArray from .._shared import utils diff --git a/stubs/skimage/feature/_canny.pyi b/stubs/skimage/feature/_canny.pyi index 4b75d9c8..7896bea0 100644 --- a/stubs/skimage/feature/_canny.pyi +++ b/stubs/skimage/feature/_canny.pyi @@ -1,8 +1,4 @@ -import numpy as np -import scipy.ndimage as ndi -from .._shared.filters import gaussian -from .._shared.utils import check_nD def _preprocess(image, mask, sigma, mode, cval): ... def _set_local_maxima(magnitude, pts, w_num, w_denum, row_slices, col_slices, out): ... diff --git a/stubs/skimage/feature/_daisy.pyi b/stubs/skimage/feature/_daisy.pyi index f8b24e3b..0f1ea05f 100644 --- a/stubs/skimage/feature/_daisy.pyi +++ b/stubs/skimage/feature/_daisy.pyi @@ -1,12 +1,5 @@ -import math -import numpy as np -from numpy import arctan2, exp, pi, sqrt -from numpy.typing import ArrayLike -from .. import draw -from .._shared.filters import gaussian -from .._shared.utils import check_nD def daisy( image, diff --git a/stubs/skimage/feature/_hessian_det_appx_pythran.pyi b/stubs/skimage/feature/_hessian_det_appx_pythran.pyi index 40467d77..b981b947 100644 --- a/stubs/skimage/feature/_hessian_det_appx_pythran.pyi +++ b/stubs/skimage/feature/_hessian_det_appx_pythran.pyi @@ -1,4 +1,3 @@ -import numpy as np def _clip(x, low, high): ... def _integ(img, r, c, rl, cl): ... diff --git a/stubs/skimage/feature/_hog.pyi b/stubs/skimage/feature/_hog.pyi index 0891b508..50e7da34 100644 --- a/stubs/skimage/feature/_hog.pyi +++ b/stubs/skimage/feature/_hog.pyi @@ -1,4 +1,3 @@ -import numpy as np from .._shared import utils diff --git a/stubs/skimage/feature/_orb_descriptor_positions.pyi b/stubs/skimage/feature/_orb_descriptor_positions.pyi index fc9c0bf3..b771a0a1 100644 --- a/stubs/skimage/feature/_orb_descriptor_positions.pyi +++ b/stubs/skimage/feature/_orb_descriptor_positions.pyi @@ -1,6 +1,4 @@ -import os -import numpy as np # Putting this in cython was giving strange bugs for different versions # of cython which seemed to indicate troubles with the __file__ variable diff --git a/stubs/skimage/feature/blob.pyi b/stubs/skimage/feature/blob.pyi index bb8c87bf..7b02b7e8 100644 --- a/stubs/skimage/feature/blob.pyi +++ b/stubs/skimage/feature/blob.pyi @@ -1,14 +1,5 @@ -import math -import numpy as np -import scipy.ndimage as ndi from numpy.typing import NDArray -from scipy import spatial - -from .._shared.filters import gaussian -from .._shared.utils import _supported_float_type, check_nD -from ..transform import integral_image -from .peak import peak_local_max # This basic blob detection algorithm is based on: # http://www.cs.utah.edu/~jfishbau/advimproc/project1/ (04.04.2013) diff --git a/stubs/skimage/feature/brief.pyi b/stubs/skimage/feature/brief.pyi index e79bc626..75d94202 100644 --- a/stubs/skimage/feature/brief.pyi +++ b/stubs/skimage/feature/brief.pyi @@ -1,10 +1,6 @@ from typing import Literal -import numpy as np - -from .._shared.filters import gaussian -from .._shared.utils import check_nD -from .util import DescriptorExtractor, _mask_border_keypoints, _prepare_grayscale_input_2D +from .util import DescriptorExtractor class BRIEF(DescriptorExtractor): def __init__( diff --git a/stubs/skimage/feature/brief_pythran.pyi b/stubs/skimage/feature/brief_pythran.pyi index 23a7acf4..6f8ba59a 100644 --- a/stubs/skimage/feature/brief_pythran.pyi +++ b/stubs/skimage/feature/brief_pythran.pyi @@ -1,4 +1,3 @@ -import numpy as np # pythran export _brief_loop(float32[:,:] or float64[:,:], uint8[:,:], int64[:,2], int32[:,2], int32[:,2]) def _brief_loop(image, descriptors, keypoints, pos0, pos1): ... diff --git a/stubs/skimage/feature/censure.pyi b/stubs/skimage/feature/censure.pyi index 6baeef2d..ae5ba88a 100644 --- a/stubs/skimage/feature/censure.pyi +++ b/stubs/skimage/feature/censure.pyi @@ -1,11 +1,5 @@ -import numpy as np -from scipy.ndimage import convolve, maximum_filter, minimum_filter -from .._shared.utils import check_nD -from ..feature import structure_tensor -from ..feature.util import FeatureDetector, _mask_border_keypoints, _prepare_grayscale_input_2D -from ..morphology import octagon, star -from ..transform import integral_image +from ..feature.util import FeatureDetector # The paper(Reference [1]) mentions the sizes of the Octagon shaped filter # kernel for the first seven scales only. The sizes of the later scales diff --git a/stubs/skimage/feature/corner.pyi b/stubs/skimage/feature/corner.pyi index 9bebb681..da3f4cf2 100644 --- a/stubs/skimage/feature/corner.pyi +++ b/stubs/skimage/feature/corner.pyi @@ -1,17 +1,7 @@ -from itertools import combinations_with_replacement from typing import Literal -from warnings import warn import numpy as np -from numpy import ndarray from numpy.typing import ArrayLike, NDArray -from scipy import ndimage as ndi, spatial, stats - -from .._shared.filters import gaussian -from .._shared.utils import _supported_float_type, safe_as_int -from ..transform import integral_image -from .peak import peak_local_max -from .util import _prepare_grayscale_input_2D, _prepare_grayscale_input_nD def _compute_derivatives(image, mode="constant", cval=0): ... def structure_tensor( diff --git a/stubs/skimage/feature/haar.pyi b/stubs/skimage/feature/haar.pyi index 656d04ba..9cbec6a5 100644 --- a/stubs/skimage/feature/haar.pyi +++ b/stubs/skimage/feature/haar.pyi @@ -1,11 +1,6 @@ -from itertools import chain -from operator import add -import numpy as np from numpy.typing import ArrayLike -from ..draw import rectangle - FEATURE_TYPE = ... def _validate_feature_type(feature_type): ... diff --git a/stubs/skimage/feature/match.pyi b/stubs/skimage/feature/match.pyi index f9190062..73b00d97 100644 --- a/stubs/skimage/feature/match.pyi +++ b/stubs/skimage/feature/match.pyi @@ -1,5 +1,3 @@ -import numpy as np -from scipy.spatial.distance import cdist def match_descriptors( descriptors1, diff --git a/stubs/skimage/feature/orb.pyi b/stubs/skimage/feature/orb.pyi index c6f3211f..11c8892a 100644 --- a/stubs/skimage/feature/orb.pyi +++ b/stubs/skimage/feature/orb.pyi @@ -1,9 +1,5 @@ -import numpy as np -from .._shared.utils import check_nD -from ..feature import corner_fast, corner_harris, corner_orientations, corner_peaks -from ..feature.util import DescriptorExtractor, FeatureDetector, _mask_border_keypoints, _prepare_grayscale_input_2D -from ..transform import pyramid_gaussian +from ..feature.util import DescriptorExtractor, FeatureDetector OFAST_MASK = ... OFAST_UMAX: list = ... diff --git a/stubs/skimage/feature/peak.pyi b/stubs/skimage/feature/peak.pyi index fe17650c..e3415135 100644 --- a/stubs/skimage/feature/peak.pyi +++ b/stubs/skimage/feature/peak.pyi @@ -1,12 +1,7 @@ -from warnings import warn import numpy as np -import scipy.ndimage as ndi -from numpy import ndarray from numpy.typing import NDArray -from .. import measure -from .._shared.coord import ensure_spacing from .._shared.utils import remove_arg def _get_high_intensity_peaks(image, mask, num_peaks, min_distance, p_norm): ... diff --git a/stubs/skimage/feature/sift.pyi b/stubs/skimage/feature/sift.pyi index b8a111ed..48364aaa 100644 --- a/stubs/skimage/feature/sift.pyi +++ b/stubs/skimage/feature/sift.pyi @@ -1,12 +1,6 @@ -import math -import numpy as np -import scipy.ndimage as ndi -from .._shared.filters import gaussian -from .._shared.utils import _supported_float_type, check_nD from ..feature.util import DescriptorExtractor, FeatureDetector -from ..transform import rescale def _edgeness(hxx, hyy, hxy): ... def _sparse_gradient(vol, positions): ... diff --git a/stubs/skimage/feature/template.pyi b/stubs/skimage/feature/template.pyi index bf3d18e2..d5f51b15 100644 --- a/stubs/skimage/feature/template.pyi +++ b/stubs/skimage/feature/template.pyi @@ -1,8 +1,4 @@ -import numpy as np from numpy.typing import ArrayLike -from scipy.signal import fftconvolve - -from .._shared.utils import _supported_float_type, check_nD def _window_sum_2d(image, window_shape): ... def _window_sum_3d(image, window_shape): ... diff --git a/stubs/skimage/feature/texture.pyi b/stubs/skimage/feature/texture.pyi index 037fe8f4..9afd5a15 100644 --- a/stubs/skimage/feature/texture.pyi +++ b/stubs/skimage/feature/texture.pyi @@ -1,11 +1,8 @@ from typing import Literal import numpy as np -from numpy import ndarray from numpy.typing import NDArray -from .._shared.utils import check_nD - def graycomatrix( image, distances, diff --git a/stubs/skimage/feature/util.pyi b/stubs/skimage/feature/util.pyi index 6bd2c684..e8f74b07 100644 --- a/stubs/skimage/feature/util.pyi +++ b/stubs/skimage/feature/util.pyi @@ -1,9 +1,5 @@ from typing import Literal -import numpy as np - -from .._shared.utils import _supported_float_type, check_nD - class FeatureDetector(object): def __init__(self): ... def detect(self, image): ... diff --git a/stubs/skimage/future/graph/_ncut.pyi b/stubs/skimage/future/graph/_ncut.pyi index 16df95fc..08058122 100644 --- a/stubs/skimage/future/graph/_ncut.pyi +++ b/stubs/skimage/future/graph/_ncut.pyi @@ -1,7 +1,4 @@ -import networkx as nx -import numpy as np from numpy.typing import NDArray -from scipy import sparse from .rag import RAG diff --git a/stubs/skimage/future/graph/graph_cut.pyi b/stubs/skimage/future/graph/graph_cut.pyi index 5b10a39b..61fcc14e 100644 --- a/stubs/skimage/future/graph/graph_cut.pyi +++ b/stubs/skimage/future/graph/graph_cut.pyi @@ -1,9 +1,5 @@ -import networkx as nx -import numpy as np from numpy.typing import ArrayLike, NDArray -from scipy.sparse import linalg -from . import _ncut from .rag import RAG def cut_threshold(labels: NDArray, rag: RAG, thresh: float, in_place: bool = True) -> NDArray: ... diff --git a/stubs/skimage/future/graph/graph_merge.pyi b/stubs/skimage/future/graph/graph_merge.pyi index edd789d7..3c3924b6 100644 --- a/stubs/skimage/future/graph/graph_merge.pyi +++ b/stubs/skimage/future/graph/graph_merge.pyi @@ -1,7 +1,5 @@ -import heapq from typing import Callable -import numpy as np from numpy.typing import NDArray from .rag import RAG diff --git a/stubs/skimage/future/graph/rag.pyi b/stubs/skimage/future/graph/rag.pyi index f5f0dfa9..0bca9422 100644 --- a/stubs/skimage/future/graph/rag.pyi +++ b/stubs/skimage/future/graph/rag.pyi @@ -1,10 +1,6 @@ -import math from typing import Callable, Literal, Mapping, Sequence import networkx as nx -import numpy as np -from numpy.lib.stride_tricks import as_strided -from scipy import ndimage as ndi, sparse from ..._shared.version_requirements import require from .rag import RAG diff --git a/stubs/skimage/future/graph/setup.pyi b/stubs/skimage/future/graph/setup.pyi index d2a4c90d..8f1aecbd 100644 --- a/stubs/skimage/future/graph/setup.pyi +++ b/stubs/skimage/future/graph/setup.pyi @@ -1,6 +1,5 @@ #!/usr/bin/env python -import os.path base_path = ... diff --git a/stubs/skimage/future/manual_segmentation.pyi b/stubs/skimage/future/manual_segmentation.pyi index d47a0102..c61fac18 100644 --- a/stubs/skimage/future/manual_segmentation.pyi +++ b/stubs/skimage/future/manual_segmentation.pyi @@ -1,9 +1,6 @@ -from functools import reduce -import numpy as np from .._shared.version_requirements import require -from ..draw import polygon LEFT_CLICK: int = ... RIGHT_CLICK: int = ... diff --git a/stubs/skimage/future/trainable_segmentation.pyi b/stubs/skimage/future/trainable_segmentation.pyi index 77ef1137..249377b5 100644 --- a/stubs/skimage/future/trainable_segmentation.pyi +++ b/stubs/skimage/future/trainable_segmentation.pyi @@ -1,7 +1,5 @@ from numpy.typing import NDArray -from ..feature import multiscale_basic_features - class TrainableSegmenter(object): def __init__(self, clf=None, features_func=None): ... def compute_features(self, image): ... diff --git a/stubs/skimage/measure/_blur_effect.pyi b/stubs/skimage/measure/_blur_effect.pyi index 53abf42f..168f88cf 100644 --- a/stubs/skimage/measure/_blur_effect.pyi +++ b/stubs/skimage/measure/_blur_effect.pyi @@ -1,7 +1,5 @@ from typing import Callable -import numpy as np -import scipy.ndimage as ndi from numpy.typing import NDArray __all__ = ["blur_effect"] diff --git a/stubs/skimage/measure/_find_contours.pyi b/stubs/skimage/measure/_find_contours.pyi index bafc67d0..193f00cc 100644 --- a/stubs/skimage/measure/_find_contours.pyi +++ b/stubs/skimage/measure/_find_contours.pyi @@ -1,6 +1,4 @@ -from collections import deque -import numpy as np from .._shared.utils import deprecate_kwarg diff --git a/stubs/skimage/measure/_label.pyi b/stubs/skimage/measure/_label.pyi index 47a84cea..35b5c104 100644 --- a/stubs/skimage/measure/_label.pyi +++ b/stubs/skimage/measure/_label.pyi @@ -1,4 +1,3 @@ -from scipy import ndimage from .._shared.utils import deprecate_kwarg diff --git a/stubs/skimage/measure/_marching_cubes_classic.pyi b/stubs/skimage/measure/_marching_cubes_classic.pyi index 2be25978..ec6bbbe5 100644 --- a/stubs/skimage/measure/_marching_cubes_classic.pyi +++ b/stubs/skimage/measure/_marching_cubes_classic.pyi @@ -1,5 +1,3 @@ -import numpy as np -import scipy.ndimage as ndi def _marching_cubes_classic(volume, level, spacing, gradient_direction): ... def mesh_surface_area(verts, faces) -> float: ... diff --git a/stubs/skimage/measure/_marching_cubes_lewiner.pyi b/stubs/skimage/measure/_marching_cubes_lewiner.pyi index 43b2ea08..9d2a3391 100644 --- a/stubs/skimage/measure/_marching_cubes_lewiner.pyi +++ b/stubs/skimage/measure/_marching_cubes_lewiner.pyi @@ -1,9 +1,5 @@ -import base64 -import numpy as np -from . import _marching_cubes_lewiner_luts as mcluts -from ._marching_cubes_classic import _marching_cubes_classic def marching_cubes( volume, diff --git a/stubs/skimage/measure/_moments.pyi b/stubs/skimage/measure/_moments.pyi index 890c9226..b1d41a11 100644 --- a/stubs/skimage/measure/_moments.pyi +++ b/stubs/skimage/measure/_moments.pyi @@ -1,10 +1,6 @@ -import itertools -import numpy as np from numpy.typing import ArrayLike -from .._shared.utils import _supported_float_type, check_nD - def moments_coords(coords, order: int = 3): ... def moments_coords_central(coords, center: tuple[float, ...] | None = None, order: int = 3): ... def moments(image, order: int = 3): ... diff --git a/stubs/skimage/measure/_polygon.pyi b/stubs/skimage/measure/_polygon.pyi index 1cd4ed1b..54a33a8e 100644 --- a/stubs/skimage/measure/_polygon.pyi +++ b/stubs/skimage/measure/_polygon.pyi @@ -1,5 +1,3 @@ -import numpy as np -from scipy import signal def approximate_polygon(coords, tolerance: float): ... diff --git a/stubs/skimage/measure/_regionprops.pyi b/stubs/skimage/measure/_regionprops.pyi index 7a0b2397..36b48eb4 100644 --- a/stubs/skimage/measure/_regionprops.pyi +++ b/stubs/skimage/measure/_regionprops.pyi @@ -1,17 +1,7 @@ -import inspect -from functools import wraps -from math import atan2, pi as PI, sqrt from typing import Mapping -from warnings import warn -import numpy as np from numpy.typing import ArrayLike -from scipy import ndimage as ndi -from scipy.spatial.distance import pdist -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 diff --git a/stubs/skimage/measure/_regionprops_utils.pyi b/stubs/skimage/measure/_regionprops_utils.pyi index 2ae5fe0e..d3590d8c 100644 --- a/stubs/skimage/measure/_regionprops_utils.pyi +++ b/stubs/skimage/measure/_regionprops_utils.pyi @@ -1,7 +1,4 @@ -from math import sqrt -import numpy as np -from scipy import ndimage as ndi STREL_4 = ... STREL_8 = ... diff --git a/stubs/skimage/measure/block.pyi b/stubs/skimage/measure/block.pyi index 8c71bd02..eae760ed 100644 --- a/stubs/skimage/measure/block.pyi +++ b/stubs/skimage/measure/block.pyi @@ -1,6 +1,5 @@ from typing import Callable, Mapping -import numpy as np from numpy.typing import NDArray def block_reduce( diff --git a/stubs/skimage/measure/entropy.pyi b/stubs/skimage/measure/entropy.pyi index 800ba96a..265286ce 100644 --- a/stubs/skimage/measure/entropy.pyi +++ b/stubs/skimage/measure/entropy.pyi @@ -1,4 +1,2 @@ -from numpy import unique -from scipy.stats import entropy as scipy_entropy def shannon_entropy(image, base: float = 2) -> float: ... diff --git a/stubs/skimage/measure/fit.pyi b/stubs/skimage/measure/fit.pyi index 0883b955..eced10e6 100644 --- a/stubs/skimage/measure/fit.pyi +++ b/stubs/skimage/measure/fit.pyi @@ -1,11 +1,6 @@ -import math from typing import Any -from warnings import warn -import numpy as np -from numpy.linalg import inv from numpy.typing import ArrayLike -from scipy import optimize, spatial def _check_data_dim(data, dim): ... def _check_data_atleast_2D(data): ... diff --git a/stubs/skimage/measure/profile.pyi b/stubs/skimage/measure/profile.pyi index c4d529c5..d109bb74 100644 --- a/stubs/skimage/measure/profile.pyi +++ b/stubs/skimage/measure/profile.pyi @@ -1,10 +1,6 @@ from typing import Callable, Literal -import numpy as np from numpy.typing import ArrayLike -from scipy import ndimage as ndi - -from .._shared.utils import _fix_ndimage_mode, _validate_interpolation_order def profile_line( image, diff --git a/stubs/skimage/measure/setup.pyi b/stubs/skimage/measure/setup.pyi index ae1561c5..8f1aecbd 100644 --- a/stubs/skimage/measure/setup.pyi +++ b/stubs/skimage/measure/setup.pyi @@ -1,6 +1,5 @@ #!/usr/bin/env python -import os base_path = ... diff --git a/stubs/skimage/morphology/_flood_fill.pyi b/stubs/skimage/morphology/_flood_fill.pyi index aa35a2ca..6b9a6b3b 100644 --- a/stubs/skimage/morphology/_flood_fill.pyi +++ b/stubs/skimage/morphology/_flood_fill.pyi @@ -1,8 +1,6 @@ -import numpy as np from numpy.typing import NDArray from .._shared.utils import deprecate_kwarg -from ._util import _offsets_to_raveled_neighbors, _resolve_neighborhood, _set_border_values @deprecate_kwarg( kwarg_mapping={"selem": "footprint"}, diff --git a/stubs/skimage/morphology/_skeletonize.pyi b/stubs/skimage/morphology/_skeletonize.pyi index b768c483..4c5e8d77 100644 --- a/stubs/skimage/morphology/_skeletonize.pyi +++ b/stubs/skimage/morphology/_skeletonize.pyi @@ -1,10 +1,8 @@ from typing import Literal -import numpy as np from numpy.typing import NDArray -from scipy import ndimage as ndi -from .._shared.utils import check_nD, deprecate_kwarg +from .._shared.utils import deprecate_kwarg def skeletonize(image, *, method: Literal["zhang", "lee"] | None = None) -> NDArray: ... def skeletonize_2d(image) -> NDArray: ... diff --git a/stubs/skimage/morphology/_util.pyi b/stubs/skimage/morphology/_util.pyi index 4cbc7c28..ca52fc32 100644 --- a/stubs/skimage/morphology/_util.pyi +++ b/stubs/skimage/morphology/_util.pyi @@ -1,5 +1,3 @@ -import numpy as np -from scipy import ndimage as ndi def _validate_connectivity(image_dim, connectivity, offset): ... def _raveled_offsets_and_distances( diff --git a/stubs/skimage/morphology/binary.pyi b/stubs/skimage/morphology/binary.pyi index a294e076..6cb6be98 100644 --- a/stubs/skimage/morphology/binary.pyi +++ b/stubs/skimage/morphology/binary.pyi @@ -1,6 +1,4 @@ -import numpy as np from numpy.typing import NDArray -from scipy import ndimage as ndi from .._shared.utils import deprecate_kwarg from .misc import default_footprint diff --git a/stubs/skimage/morphology/convex_hull.pyi b/stubs/skimage/morphology/convex_hull.pyi index c2db2254..1e3c2461 100644 --- a/stubs/skimage/morphology/convex_hull.pyi +++ b/stubs/skimage/morphology/convex_hull.pyi @@ -1,12 +1,6 @@ -from itertools import product -import numpy as np from numpy.typing import ArrayLike, NDArray -from .._shared.utils import warn -from ..measure._label import label -from ..measure.pnpoly import grid_points_in_poly - __all__ = ["convex_hull_image", "convex_hull_object"] def _offsets_diamond(ndim): ... diff --git a/stubs/skimage/morphology/extrema.pyi b/stubs/skimage/morphology/extrema.pyi index bd3f7917..2a95dc85 100644 --- a/stubs/skimage/morphology/extrema.pyi +++ b/stubs/skimage/morphology/extrema.pyi @@ -1,9 +1,7 @@ import numpy as np -from numpy import ndarray from numpy.typing import NDArray -from .._shared.utils import deprecate_kwarg, warn -from . import _util, grayreconstruct +from .._shared.utils import deprecate_kwarg def _add_constant_clip(image, const_value): ... def _subtract_constant_clip(image, const_value): ... diff --git a/stubs/skimage/morphology/footprints.pyi b/stubs/skimage/morphology/footprints.pyi index 8e404389..2dc70fa9 100644 --- a/stubs/skimage/morphology/footprints.pyi +++ b/stubs/skimage/morphology/footprints.pyi @@ -1,8 +1,5 @@ -import numpy as np from numpy.typing import NDArray -from scipy import ndimage as ndi -from .. import draw from .._shared.utils import deprecate_kwarg def square(width: int, dtype=...) -> NDArray: ... diff --git a/stubs/skimage/morphology/gray.pyi b/stubs/skimage/morphology/gray.pyi index bab959db..ccf0f394 100644 --- a/stubs/skimage/morphology/gray.pyi +++ b/stubs/skimage/morphology/gray.pyi @@ -1,9 +1,6 @@ -import functools from typing import Callable -import numpy as np from numpy.typing import NDArray -from scipy import ndimage as ndi from .._shared.utils import deprecate_kwarg from .misc import default_footprint diff --git a/stubs/skimage/morphology/grayreconstruct.pyi b/stubs/skimage/morphology/grayreconstruct.pyi index 715e8bfb..d247ddf2 100644 --- a/stubs/skimage/morphology/grayreconstruct.pyi +++ b/stubs/skimage/morphology/grayreconstruct.pyi @@ -1,6 +1,5 @@ from typing import Literal -import numpy as np from numpy.typing import NDArray from .._shared.utils import deprecate_kwarg diff --git a/stubs/skimage/morphology/grey.pyi b/stubs/skimage/morphology/grey.pyi index 5b33bdbe..6433dd44 100644 --- a/stubs/skimage/morphology/grey.pyi +++ b/stubs/skimage/morphology/grey.pyi @@ -1,4 +1,3 @@ -import warnings from .gray import black_tophat, closing, dilation, erosion, opening, white_tophat diff --git a/stubs/skimage/morphology/greyreconstruct.pyi b/stubs/skimage/morphology/greyreconstruct.pyi index 0bd10ab9..8b137891 100644 --- a/stubs/skimage/morphology/greyreconstruct.pyi +++ b/stubs/skimage/morphology/greyreconstruct.pyi @@ -1,3 +1 @@ -import warnings -from .grayreconstruct import reconstruction diff --git a/stubs/skimage/morphology/max_tree.pyi b/stubs/skimage/morphology/max_tree.pyi index ab851124..e645b995 100644 --- a/stubs/skimage/morphology/max_tree.pyi +++ b/stubs/skimage/morphology/max_tree.pyi @@ -1,8 +1,5 @@ -import numpy as np from numpy.typing import NDArray -from ._util import _offsets_to_raveled_neighbors, _validate_connectivity - unsigned_int_types: list = ... signed_int_types: list = ... signed_float_types: list = ... diff --git a/stubs/skimage/morphology/misc.pyi b/stubs/skimage/morphology/misc.pyi index 861cff27..1d109c3f 100644 --- a/stubs/skimage/morphology/misc.pyi +++ b/stubs/skimage/morphology/misc.pyi @@ -1,11 +1,7 @@ -import functools -import numpy as np from numpy.typing import NDArray -from scipy import ndimage as ndi -from .._shared.utils import remove_arg, warn -from .footprints import _default_footprint +from .._shared.utils import remove_arg # Our function names don't exactly correspond to ndimages. # This dictionary translates from our names to scipy's. diff --git a/stubs/skimage/morphology/selem.pyi b/stubs/skimage/morphology/selem.pyi index a517c417..8b137891 100644 --- a/stubs/skimage/morphology/selem.pyi +++ b/stubs/skimage/morphology/selem.pyi @@ -1,3 +1 @@ -import warnings -from .footprints import ball, cube, diamond, disk, octagon, octahedron, rectangle, square, star diff --git a/stubs/skimage/morphology/setup.pyi b/stubs/skimage/morphology/setup.pyi index ae1561c5..8f1aecbd 100644 --- a/stubs/skimage/morphology/setup.pyi +++ b/stubs/skimage/morphology/setup.pyi @@ -1,6 +1,5 @@ #!/usr/bin/env python -import os base_path = ... diff --git a/stubs/skimage/transform/_geometric.pyi b/stubs/skimage/transform/_geometric.pyi index 7868abb6..134adb15 100644 --- a/stubs/skimage/transform/_geometric.pyi +++ b/stubs/skimage/transform/_geometric.pyi @@ -1,12 +1,6 @@ -import math -import textwrap from typing import Sequence -import numpy as np from numpy.typing import ArrayLike -from scipy import spatial - -from .._shared.utils import get_bound_method_class, safe_as_int def _affine_matrix_from_vector(v): ... def _center_and_normalize_points(points): ... diff --git a/stubs/skimage/transform/_warps.pyi b/stubs/skimage/transform/_warps.pyi index d5e0ae91..76cdd9d8 100644 --- a/stubs/skimage/transform/_warps.pyi +++ b/stubs/skimage/transform/_warps.pyi @@ -1,24 +1,12 @@ from collections.abc import Iterable from typing import Literal, Mapping -import numpy as np -import scipy -from numpy.lib import NumpyVersion from numpy.typing import NDArray -from scipy import ndimage as ndi from .._shared.utils import ( - _to_ndimage_mode, - _validate_interpolation_order, channel_as_last_axis, - convert_to_float, deprecate_multichannel_kwarg, - get_bound_method_class, - safe_as_int, - warn, ) -from ..measure import block_reduce -from ._geometric import AffineTransform, ProjectiveTransform, SimilarityTransform HOMOGRAPHY_TRANSFORMS = ... diff --git a/stubs/skimage/transform/finite_radon_transform.pyi b/stubs/skimage/transform/finite_radon_transform.pyi index 95f598c4..f2f6955c 100644 --- a/stubs/skimage/transform/finite_radon_transform.pyi +++ b/stubs/skimage/transform/finite_radon_transform.pyi @@ -1,7 +1,5 @@ __all__ = ["frt2", "ifrt2"] -import numpy as np -from numpy import newaxis, roll def frt2(a): ... def ifrt2(a): ... diff --git a/stubs/skimage/transform/hough_transform.pyi b/stubs/skimage/transform/hough_transform.pyi index 9c5bd1d0..b677d733 100644 --- a/stubs/skimage/transform/hough_transform.pyi +++ b/stubs/skimage/transform/hough_transform.pyi @@ -1,4 +1,3 @@ -import numpy as np from numpy.typing import ArrayLike, NDArray def hough_line_peaks( diff --git a/stubs/skimage/transform/integral.pyi b/stubs/skimage/transform/integral.pyi index 4d275054..1665a91f 100644 --- a/stubs/skimage/transform/integral.pyi +++ b/stubs/skimage/transform/integral.pyi @@ -1,5 +1,4 @@ import numpy as np -from numpy import ndarray from numpy.typing import NDArray from .._typing import Scalar diff --git a/stubs/skimage/transform/pyramids.pyi b/stubs/skimage/transform/pyramids.pyi index a0aff40f..42be27a0 100644 --- a/stubs/skimage/transform/pyramids.pyi +++ b/stubs/skimage/transform/pyramids.pyi @@ -1,13 +1,8 @@ -import math from typing import Literal -import numpy as np from numpy.typing import ArrayLike, NDArray from .._shared import utils -from .._shared.filters import gaussian -from .._shared.utils import convert_to_float -from ..transform import resize def _smooth(image, sigma, mode, cval, channel_axis): ... def _check_factor(factor): ... diff --git a/stubs/skimage/transform/radon_transform.pyi b/stubs/skimage/transform/radon_transform.pyi index 5a3df66c..04f62a88 100644 --- a/stubs/skimage/transform/radon_transform.pyi +++ b/stubs/skimage/transform/radon_transform.pyi @@ -1,14 +1,5 @@ -from functools import partial -from warnings import warn -import numpy as np from numpy.typing import ArrayLike, NDArray -from scipy.constants import golden_ratio -from scipy.fft import fft, fftfreq, fftshift, ifft -from scipy.interpolate import interp1d - -from .._shared.utils import convert_to_float -from ._warps import warp __all__ = ["radon", "order_angles_golden_ratio", "iradon", "iradon_sart"] diff --git a/stubs/skimage/transform/setup.pyi b/stubs/skimage/transform/setup.pyi index ae1561c5..8f1aecbd 100644 --- a/stubs/skimage/transform/setup.pyi +++ b/stubs/skimage/transform/setup.pyi @@ -1,6 +1,5 @@ #!/usr/bin/env python -import os base_path = ... diff --git a/stubs/sklearn/__check_build/__init__.pyi b/stubs/sklearn/__check_build/__init__.pyi index 39e45e63..e69de29b 100644 --- a/stubs/sklearn/__check_build/__init__.pyi +++ b/stubs/sklearn/__check_build/__init__.pyi @@ -1 +0,0 @@ -from ._check_build import check_build diff --git a/stubs/sklearn/__check_build/setup.pyi b/stubs/sklearn/__check_build/setup.pyi index 44de5687..a59b52db 100644 --- a/stubs/sklearn/__check_build/setup.pyi +++ b/stubs/sklearn/__check_build/setup.pyi @@ -1,6 +1,3 @@ -import numpy -from numpy.distutils.core import setup -from numpy.distutils.misc_util import Configuration # Author: Virgile Fritsch # License: BSD 3 clause diff --git a/stubs/sklearn/_build_utils/openmp_helpers.pyi b/stubs/sklearn/_build_utils/openmp_helpers.pyi index 8d0903c4..9c33c85e 100644 --- a/stubs/sklearn/_build_utils/openmp_helpers.pyi +++ b/stubs/sklearn/_build_utils/openmp_helpers.pyi @@ -1,7 +1,3 @@ -import os -import sys -import textwrap -import warnings from .pre_build_helpers import compile_test_program as compile_test_program diff --git a/stubs/sklearn/_build_utils/pre_build_helpers.pyi b/stubs/sklearn/_build_utils/pre_build_helpers.pyi index ec856823..d9c0230a 100644 --- a/stubs/sklearn/_build_utils/pre_build_helpers.pyi +++ b/stubs/sklearn/_build_utils/pre_build_helpers.pyi @@ -1,9 +1,3 @@ -import glob -import os -import subprocess -import sys -import tempfile -import textwrap def compile_test_program(code, extra_preargs: list = [], extra_postargs: list = []): ... def basic_check_build(): ... diff --git a/stubs/sklearn/_config.pyi b/stubs/sklearn/_config.pyi index 45334bf6..5ff3e924 100644 --- a/stubs/sklearn/_config.pyi +++ b/stubs/sklearn/_config.pyi @@ -1,5 +1,3 @@ -import os -import threading from contextlib import contextmanager as contextmanager from typing import Iterator, Literal diff --git a/stubs/sklearn/_loss/glm_distribution.pyi b/stubs/sklearn/_loss/glm_distribution.pyi index f8c29acc..58764acb 100644 --- a/stubs/sklearn/_loss/glm_distribution.pyi +++ b/stubs/sklearn/_loss/glm_distribution.pyi @@ -1,8 +1,6 @@ -import numbers from abc import ABCMeta, abstractmethod from collections import namedtuple as namedtuple -import numpy as np from numpy import ndarray from scipy.special import xlogy as xlogy diff --git a/stubs/sklearn/_loss/link.pyi b/stubs/sklearn/_loss/link.pyi index 07bd5700..13b2d930 100644 --- a/stubs/sklearn/_loss/link.pyi +++ b/stubs/sklearn/_loss/link.pyi @@ -2,7 +2,6 @@ from abc import ABC, abstractmethod from dataclasses import dataclass from typing import ClassVar -import numpy as np from numpy import ndarray from scipy.special import expit as expit, logit as logit from scipy.stats import gmean as gmean diff --git a/stubs/sklearn/_loss/loss.pyi b/stubs/sklearn/_loss/loss.pyi index b5863637..53f82290 100644 --- a/stubs/sklearn/_loss/loss.pyi +++ b/stubs/sklearn/_loss/loss.pyi @@ -1,7 +1,5 @@ -import numbers from typing import ClassVar, Literal, Type -import numpy as np from numpy import ndarray from scipy.special import xlogy as xlogy @@ -14,7 +12,6 @@ from ._loss import ( CyHalfGammaLoss as CyHalfGammaLoss, CyHalfMultinomialLoss as CyHalfMultinomialLoss, CyHalfPoissonLoss as CyHalfPoissonLoss, - CyHalfSquaredError, CyHalfTweedieLoss as CyHalfTweedieLoss, CyHalfTweedieLossIdentity as CyHalfTweedieLossIdentity, CyLossFunction, @@ -22,7 +19,6 @@ from ._loss import ( ) from .link import ( BaseLink, - IdentityLink, Interval, LogitLink as LogitLink, LogLink as LogLink, diff --git a/stubs/sklearn/_loss/setup.pyi b/stubs/sklearn/_loss/setup.pyi index 5e4f0fc9..62052209 100644 --- a/stubs/sklearn/_loss/setup.pyi +++ b/stubs/sklearn/_loss/setup.pyi @@ -1,7 +1,3 @@ -import numpy -from numpy.distutils.core import setup -from numpy.distutils.misc_util import Configuration -from .._build_utils import gen_from_templates def configuration(parent_package: str = "", top_path=None): ... diff --git a/stubs/sklearn/_min_dependencies.pyi b/stubs/sklearn/_min_dependencies.pyi index 4e52adda..00ad0122 100644 --- a/stubs/sklearn/_min_dependencies.pyi +++ b/stubs/sklearn/_min_dependencies.pyi @@ -1,5 +1,3 @@ -import argparse -import platform from collections import defaultdict as defaultdict SCIPY_MIN_VERSION: str = ... diff --git a/stubs/sklearn/base.pyi b/stubs/sklearn/base.pyi index dd5afa71..9ad33994 100644 --- a/stubs/sklearn/base.pyi +++ b/stubs/sklearn/base.pyi @@ -16,13 +16,7 @@ BaseEstimator_Self = TypeVar("BaseEstimator_Self", bound="BaseEstimator") # Author: Gael Varoquaux # License: BSD 3 clause -import copy -import inspect -import platform -import re -import warnings -import numpy as np def clone(estimator: BaseEstimator | Iterable[BaseEstimator], *, safe: bool = True) -> Any: ... diff --git a/stubs/sklearn/calibration.pyi b/stubs/sklearn/calibration.pyi index 181bedaf..aa2462f1 100644 --- a/stubs/sklearn/calibration.pyi +++ b/stubs/sklearn/calibration.pyi @@ -34,9 +34,7 @@ from .utils.validation import check_consistent_length as check_consistent_length CalibratedClassifierCV_Self = TypeVar("CalibratedClassifierCV_Self", bound="CalibratedClassifierCV") _SigmoidCalibration_Self = TypeVar("_SigmoidCalibration_Self", bound="_SigmoidCalibration") -import warnings -import numpy as np class CalibratedClassifierCV(ClassifierMixin, MetaEstimatorMixin, BaseEstimator): calibrated_classifiers_: list = ... diff --git a/stubs/sklearn/cluster/_affinity_propagation.pyi b/stubs/sklearn/cluster/_affinity_propagation.pyi index 4482fea7..7c77a1e1 100644 --- a/stubs/sklearn/cluster/_affinity_propagation.pyi +++ b/stubs/sklearn/cluster/_affinity_propagation.pyi @@ -15,9 +15,7 @@ from ..utils.validation import check_is_fitted as check_is_fitted AffinityPropagation_Self = TypeVar("AffinityPropagation_Self", bound="AffinityPropagation") -import warnings -import numpy as np ############################################################################### # Public API diff --git a/stubs/sklearn/cluster/_agglomerative.pyi b/stubs/sklearn/cluster/_agglomerative.pyi index c526afd4..a913a525 100644 --- a/stubs/sklearn/cluster/_agglomerative.pyi +++ b/stubs/sklearn/cluster/_agglomerative.pyi @@ -1,6 +1,6 @@ from heapq import heapify as heapify, heappop as heappop, heappush as heappush, heappushpop as heappushpop from numbers import Integral as Integral, Real as Real -from typing import Any, Callable, ClassVar, Literal, Set, TypeVar +from typing import Any, Callable, ClassVar, Literal, TypeVar from joblib import Memory from numpy import ndarray @@ -22,9 +22,7 @@ from ._feature_agglomeration import AgglomerationTransform FeatureAgglomeration_Self = TypeVar("FeatureAgglomeration_Self", bound="FeatureAgglomeration") AgglomerativeClustering_Self = TypeVar("AgglomerativeClustering_Self", bound="AgglomerativeClustering") -import warnings -import numpy as np ############################################################################### # Hierarchical tree building functions diff --git a/stubs/sklearn/cluster/_bicluster.pyi b/stubs/sklearn/cluster/_bicluster.pyi index 03a7ce5b..0a964fd6 100644 --- a/stubs/sklearn/cluster/_bicluster.pyi +++ b/stubs/sklearn/cluster/_bicluster.pyi @@ -22,7 +22,6 @@ from . import KMeans as KMeans, MiniBatchKMeans as MiniBatchKMeans BaseSpectral_Self = TypeVar("BaseSpectral_Self", bound="BaseSpectral") -import numpy as np __all__ = ["SpectralCoclustering", "SpectralBiclustering"] diff --git a/stubs/sklearn/cluster/_birch.pyi b/stubs/sklearn/cluster/_birch.pyi index 397548fe..9bdd4d23 100644 --- a/stubs/sklearn/cluster/_birch.pyi +++ b/stubs/sklearn/cluster/_birch.pyi @@ -24,9 +24,7 @@ Birch_Self = TypeVar("Birch_Self", bound="Birch") # Joel Nothman # License: BSD 3 clause -import warnings -import numpy as np class _CFNode: squared_norm_: ndarray = ... diff --git a/stubs/sklearn/cluster/_bisect_k_means.pyi b/stubs/sklearn/cluster/_bisect_k_means.pyi index 000eec7c..604070cc 100644 --- a/stubs/sklearn/cluster/_bisect_k_means.pyi +++ b/stubs/sklearn/cluster/_bisect_k_means.pyi @@ -13,10 +13,7 @@ BisectingKMeans_Self = TypeVar("BisectingKMeans_Self", bound="BisectingKMeans") # Author: Michal Krawczyk -import warnings -import numpy as np -import scipy.sparse as sp class _BisectingTree: def __init__(self, center: ndarray, indices: ndarray, score: Float) -> None: ... diff --git a/stubs/sklearn/cluster/_dbscan.pyi b/stubs/sklearn/cluster/_dbscan.pyi index 71c3b0ac..174ccf45 100644 --- a/stubs/sklearn/cluster/_dbscan.pyi +++ b/stubs/sklearn/cluster/_dbscan.pyi @@ -18,9 +18,7 @@ DBSCAN_Self = TypeVar("DBSCAN_Self", bound="DBSCAN") # # License: BSD 3 clause -import warnings -import numpy as np def dbscan( X: MatrixLike, diff --git a/stubs/sklearn/cluster/_feature_agglomeration.pyi b/stubs/sklearn/cluster/_feature_agglomeration.pyi index 420f1e0e..2ac4d826 100644 --- a/stubs/sklearn/cluster/_feature_agglomeration.pyi +++ b/stubs/sklearn/cluster/_feature_agglomeration.pyi @@ -1,4 +1,3 @@ -import numpy as np from numpy import ndarray from scipy.sparse import issparse as issparse diff --git a/stubs/sklearn/cluster/_kmeans.pyi b/stubs/sklearn/cluster/_kmeans.pyi index f23022fe..4de1e896 100644 --- a/stubs/sklearn/cluster/_kmeans.pyi +++ b/stubs/sklearn/cluster/_kmeans.pyi @@ -37,10 +37,7 @@ from ._k_means_lloyd import ( KMeans_Self = TypeVar("KMeans_Self", bound="KMeans") MiniBatchKMeans_Self = TypeVar("MiniBatchKMeans_Self", bound="MiniBatchKMeans") -import warnings -import numpy as np -import scipy.sparse as sp ############################################################################### # Initialization heuristic diff --git a/stubs/sklearn/cluster/_mean_shift.pyi b/stubs/sklearn/cluster/_mean_shift.pyi index ed18fb26..0a8f9139 100644 --- a/stubs/sklearn/cluster/_mean_shift.pyi +++ b/stubs/sklearn/cluster/_mean_shift.pyi @@ -22,9 +22,7 @@ MeanShift_Self = TypeVar("MeanShift_Self", bound="MeanShift") # Gael Varoquaux # Martino Sorbaro -import warnings -import numpy as np def estimate_bandwidth( X: MatrixLike, diff --git a/stubs/sklearn/cluster/_optics.pyi b/stubs/sklearn/cluster/_optics.pyi index 84aab08a..89a0d942 100644 --- a/stubs/sklearn/cluster/_optics.pyi +++ b/stubs/sklearn/cluster/_optics.pyi @@ -17,9 +17,7 @@ from ..utils.validation import check_memory as check_memory OPTICS_Self = TypeVar("OPTICS_Self", bound="OPTICS") -import warnings -import numpy as np class OPTICS(ClusterMixin, BaseEstimator): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/cluster/_spectral.pyi b/stubs/sklearn/cluster/_spectral.pyi index d8f5a79e..af71dcbd 100644 --- a/stubs/sklearn/cluster/_spectral.pyi +++ b/stubs/sklearn/cluster/_spectral.pyi @@ -18,9 +18,7 @@ from ._kmeans import k_means as k_means SpectralClustering_Self = TypeVar("SpectralClustering_Self", bound="SpectralClustering") -import warnings -import numpy as np def cluster_qr(vectors: MatrixLike) -> ndarray: ... def discretize( diff --git a/stubs/sklearn/cluster/setup.pyi b/stubs/sklearn/cluster/setup.pyi index 669ef9b2..50695f9a 100644 --- a/stubs/sklearn/cluster/setup.pyi +++ b/stubs/sklearn/cluster/setup.pyi @@ -1,9 +1,5 @@ # Author: Alexandre Gramfort # License: BSD 3 clause -import os -import numpy -from numpy.distutils.core import setup -from numpy.distutils.misc_util import Configuration def configuration(parent_package: str = "", top_path=None): ... diff --git a/stubs/sklearn/compose/_column_transformer.pyi b/stubs/sklearn/compose/_column_transformer.pyi index f6fe6d05..326193a2 100644 --- a/stubs/sklearn/compose/_column_transformer.pyi +++ b/stubs/sklearn/compose/_column_transformer.pyi @@ -17,7 +17,6 @@ from ..utils.validation import check_array as check_array, check_is_fitted as ch ColumnTransformer_Self = TypeVar("ColumnTransformer_Self", bound="ColumnTransformer") -import numpy as np __all__ = ["ColumnTransformer", "make_column_transformer", "make_column_selector"] diff --git a/stubs/sklearn/compose/_target.pyi b/stubs/sklearn/compose/_target.pyi index 782bc388..16461ecc 100644 --- a/stubs/sklearn/compose/_target.pyi +++ b/stubs/sklearn/compose/_target.pyi @@ -17,9 +17,7 @@ TransformedTargetRegressor_Self = TypeVar("TransformedTargetRegressor_Self", bou # Guillaume Lemaitre # License: BSD 3 clause -import warnings -import numpy as np __all__ = ["TransformedTargetRegressor"] diff --git a/stubs/sklearn/conftest.pyi b/stubs/sklearn/conftest.pyi index 81feb61a..00dc51dd 100644 --- a/stubs/sklearn/conftest.pyi +++ b/stubs/sklearn/conftest.pyi @@ -1,11 +1,7 @@ -import platform -import sys from functools import wraps as wraps from os import environ as environ from typing import Sequence -import numpy as np -import pytest from _pytest.doctest import DoctestItem as DoctestItem from threadpoolctl import threadpool_limits as threadpool_limits diff --git a/stubs/sklearn/covariance/_elliptic_envelope.pyi b/stubs/sklearn/covariance/_elliptic_envelope.pyi index f7a27f30..f56f3d61 100644 --- a/stubs/sklearn/covariance/_elliptic_envelope.pyi +++ b/stubs/sklearn/covariance/_elliptic_envelope.pyi @@ -17,7 +17,6 @@ EllipticEnvelope_Self = TypeVar("EllipticEnvelope_Self", bound="EllipticEnvelope # # License: BSD 3 clause -import numpy as np class EllipticEnvelope(OutlierMixin, MinCovDet): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/covariance/_empirical_covariance.pyi b/stubs/sklearn/covariance/_empirical_covariance.pyi index aac6bf80..c0116b81 100644 --- a/stubs/sklearn/covariance/_empirical_covariance.pyi +++ b/stubs/sklearn/covariance/_empirical_covariance.pyi @@ -19,9 +19,7 @@ EmpiricalCovariance_Self = TypeVar("EmpiricalCovariance_Self", bound="EmpiricalC # License: BSD 3 clause # avoid division truncation -import warnings -import numpy as np def log_likelihood(emp_cov: MatrixLike, precision: MatrixLike) -> Float: ... def empirical_covariance(X: ArrayLike, *, assume_centered: bool = False) -> ndarray: ... diff --git a/stubs/sklearn/covariance/_graph_lasso.pyi b/stubs/sklearn/covariance/_graph_lasso.pyi index e354cfe3..88e00839 100644 --- a/stubs/sklearn/covariance/_graph_lasso.pyi +++ b/stubs/sklearn/covariance/_graph_lasso.pyi @@ -17,16 +17,11 @@ from . import EmpiricalCovariance, empirical_covariance as empirical_covariance, GraphicalLassoCV_Self = TypeVar("GraphicalLassoCV_Self", bound="GraphicalLassoCV") GraphicalLasso_Self = TypeVar("GraphicalLasso_Self", bound="GraphicalLasso") -import operator -import sys -import time # Author: Gael Varoquaux # License: BSD 3 clause # Copyright: INRIA -import warnings -import numpy as np def alpha_max(emp_cov: MatrixLike) -> Float: ... diff --git a/stubs/sklearn/covariance/_robust_covariance.pyi b/stubs/sklearn/covariance/_robust_covariance.pyi index b4be6d28..aa6b4a74 100644 --- a/stubs/sklearn/covariance/_robust_covariance.pyi +++ b/stubs/sklearn/covariance/_robust_covariance.pyi @@ -18,9 +18,7 @@ MinCovDet_Self = TypeVar("MinCovDet_Self", bound="MinCovDet") # # License: BSD 3 clause -import warnings -import numpy as np # Minimum Covariance Determinant # Implementing of an algorithm by Rousseeuw & Van Driessen described in diff --git a/stubs/sklearn/covariance/_shrunk_covariance.pyi b/stubs/sklearn/covariance/_shrunk_covariance.pyi index a3574542..3293eb04 100644 --- a/stubs/sklearn/covariance/_shrunk_covariance.pyi +++ b/stubs/sklearn/covariance/_shrunk_covariance.pyi @@ -20,9 +20,7 @@ OAS_Self = TypeVar("OAS_Self", bound="OAS") # License: BSD 3 clause # avoid division truncation -import warnings -import numpy as np # ShrunkCovariance estimator diff --git a/stubs/sklearn/cross_decomposition/_pls.pyi b/stubs/sklearn/cross_decomposition/_pls.pyi index e35ef4b4..407deec9 100644 --- a/stubs/sklearn/cross_decomposition/_pls.pyi +++ b/stubs/sklearn/cross_decomposition/_pls.pyi @@ -17,9 +17,7 @@ PLSSVD_Self = TypeVar("PLSSVD_Self", bound="PLSSVD") PLSRegression_Self = TypeVar("PLSRegression_Self", bound="PLSRegression") _PLS_Self = TypeVar("_PLS_Self", bound="_PLS") -import warnings -import numpy as np __all__ = ["PLSCanonical", "PLSRegression", "PLSSVD"] diff --git a/stubs/sklearn/datasets/_arff_parser.pyi b/stubs/sklearn/datasets/_arff_parser.pyi index ba67433e..48a7e48b 100644 --- a/stubs/sklearn/datasets/_arff_parser.pyi +++ b/stubs/sklearn/datasets/_arff_parser.pyi @@ -1,12 +1,8 @@ -import itertools -import re from collections import OrderedDict as OrderedDict from collections.abc import Generator as Generator from gzip import GzipFile from typing import Any, Literal, Sequence -import numpy as np -import scipy as sp from numpy import ndarray from pandas import DataFrame, Series from scipy.sparse import spmatrix diff --git a/stubs/sklearn/datasets/_base.pyi b/stubs/sklearn/datasets/_base.pyi index 299d619a..daf97de9 100644 --- a/stubs/sklearn/datasets/_base.pyi +++ b/stubs/sklearn/datasets/_base.pyi @@ -2,11 +2,6 @@ # 2010 Fabian Pedregosa # 2010 Olivier Grisel # License: BSD 3 clause -import csv -import gzip -import hashlib -import os -import shutil from collections import namedtuple as namedtuple from importlib import resources as resources from os import environ as environ, listdir as listdir, makedirs as makedirs @@ -15,7 +10,6 @@ from pathlib import Path as Path from typing import Literal, Sequence from urllib.request import urlretrieve as urlretrieve -import numpy as np from numpy import ndarray from numpy.random import RandomState from PIL import Image as Image diff --git a/stubs/sklearn/datasets/_california_housing.pyi b/stubs/sklearn/datasets/_california_housing.pyi index e699ad05..61cf4f6f 100644 --- a/stubs/sklearn/datasets/_california_housing.pyi +++ b/stubs/sklearn/datasets/_california_housing.pyi @@ -1,11 +1,6 @@ -import logging -import tarfile from os import makedirs as makedirs, remove as remove from os.path import exists as exists -import joblib -import numpy as np - from ..utils import Bunch from . import get_data_home as get_data_home from ._base import RemoteFileMetadata as RemoteFileMetadata, load_descr as load_descr diff --git a/stubs/sklearn/datasets/_covtype.pyi b/stubs/sklearn/datasets/_covtype.pyi index ecd46cdd..0b52f365 100644 --- a/stubs/sklearn/datasets/_covtype.pyi +++ b/stubs/sklearn/datasets/_covtype.pyi @@ -1,11 +1,7 @@ -import logging -import os from gzip import GzipFile as GzipFile from os.path import exists as exists, join as join from tempfile import TemporaryDirectory as TemporaryDirectory -import joblib -import numpy as np from numpy import ndarray from numpy.random import RandomState diff --git a/stubs/sklearn/datasets/_kddcup99.pyi b/stubs/sklearn/datasets/_kddcup99.pyi index 55bb0e0e..c5a60193 100644 --- a/stubs/sklearn/datasets/_kddcup99.pyi +++ b/stubs/sklearn/datasets/_kddcup99.pyi @@ -1,16 +1,11 @@ -import errno -import logging -import os from gzip import GzipFile as GzipFile from os.path import exists as exists, join as join from typing import Literal -import joblib -import numpy as np from numpy.random import RandomState from .._typing import Int -from ..utils import check_random_state as check_random_state, shuffle as shuffle_method +from ..utils import check_random_state as check_random_state from ..utils._bunch import Bunch from . import get_data_home as get_data_home from ._base import RemoteFileMetadata as RemoteFileMetadata, load_descr as load_descr diff --git a/stubs/sklearn/datasets/_lfw.pyi b/stubs/sklearn/datasets/_lfw.pyi index dd00f2d0..c5f10b21 100644 --- a/stubs/sklearn/datasets/_lfw.pyi +++ b/stubs/sklearn/datasets/_lfw.pyi @@ -1,9 +1,7 @@ -import logging from os import listdir as listdir, makedirs as makedirs, remove as remove from os.path import exists as exists, isdir as isdir, join as join from typing import Literal -import numpy as np from joblib import Memory as Memory from .._typing import Float, Int diff --git a/stubs/sklearn/datasets/_olivetti_faces.pyi b/stubs/sklearn/datasets/_olivetti_faces.pyi index 7b1632c5..453252aa 100644 --- a/stubs/sklearn/datasets/_olivetti_faces.pyi +++ b/stubs/sklearn/datasets/_olivetti_faces.pyi @@ -1,8 +1,6 @@ from os import makedirs as makedirs, remove as remove from os.path import exists as exists -import joblib -import numpy as np from numpy import ndarray from numpy.random import RandomState from scipy.io import loadmat as loadmat diff --git a/stubs/sklearn/datasets/_openml.pyi b/stubs/sklearn/datasets/_openml.pyi index ceab1a9c..a2718a00 100644 --- a/stubs/sklearn/datasets/_openml.pyi +++ b/stubs/sklearn/datasets/_openml.pyi @@ -1,9 +1,3 @@ -import gzip -import hashlib -import json -import os -import shutil -import time from contextlib import closing as closing from functools import wraps as wraps from os.path import join as join @@ -11,9 +5,6 @@ from tempfile import TemporaryDirectory as TemporaryDirectory from typing import List, Literal, Optional, Union, overload from urllib.error import HTTPError as HTTPError, URLError as URLError from urllib.request import Request as Request, urlopen as urlopen -from warnings import warn - -import numpy as np from ..utils import Bunch, check_pandas_support as check_pandas_support from . import get_data_home as get_data_home diff --git a/stubs/sklearn/datasets/_rcv1.pyi b/stubs/sklearn/datasets/_rcv1.pyi index 614d6bf8..add84f80 100644 --- a/stubs/sklearn/datasets/_rcv1.pyi +++ b/stubs/sklearn/datasets/_rcv1.pyi @@ -1,16 +1,12 @@ -import logging from gzip import GzipFile as GzipFile from os import makedirs as makedirs, remove as remove from os.path import exists as exists, join as join from typing import Literal -import joblib -import numpy as np -import scipy.sparse as sp from numpy.random import RandomState from .._typing import Int -from ..utils import Bunch, shuffle as shuffle_ +from ..utils import Bunch from . import get_data_home as get_data_home from ._base import RemoteFileMetadata as RemoteFileMetadata, load_descr as load_descr from ._svmlight_format_io import load_svmlight_files as load_svmlight_files diff --git a/stubs/sklearn/datasets/_samples_generator.pyi b/stubs/sklearn/datasets/_samples_generator.pyi index b55b6740..4ae77e1f 100644 --- a/stubs/sklearn/datasets/_samples_generator.pyi +++ b/stubs/sklearn/datasets/_samples_generator.pyi @@ -1,11 +1,6 @@ -import array -import numbers -import warnings from collections.abc import Iterable from typing import Iterable, Literal, Sequence -import numpy as np -import scipy.sparse as sp from numpy import ndarray from numpy.random import RandomState from scipy import linalg as linalg @@ -13,7 +8,7 @@ from scipy.sparse import spmatrix from .._typing import ArrayLike, Float, Int, MatrixLike from ..preprocessing import MultiLabelBinarizer as MultiLabelBinarizer -from ..utils import check_array as check_array, check_random_state as check_random_state, shuffle as util_shuffle +from ..utils import check_array as check_array, check_random_state as check_random_state from ..utils.random import sample_without_replacement as sample_without_replacement # Authors: B. Thirion, G. Varoquaux, A. Gramfort, V. Michel, O. Grisel, diff --git a/stubs/sklearn/datasets/_species_distributions.pyi b/stubs/sklearn/datasets/_species_distributions.pyi index 31d3bb96..7a2acaef 100644 --- a/stubs/sklearn/datasets/_species_distributions.pyi +++ b/stubs/sklearn/datasets/_species_distributions.pyi @@ -1,10 +1,7 @@ -import logging from io import BytesIO as BytesIO from os import makedirs as makedirs, remove as remove from os.path import exists as exists -import joblib -import numpy as np from numpy import ndarray from ..utils._bunch import Bunch diff --git a/stubs/sklearn/datasets/_svmlight_format_io.pyi b/stubs/sklearn/datasets/_svmlight_format_io.pyi index 203b15c8..4fdb80b2 100644 --- a/stubs/sklearn/datasets/_svmlight_format_io.pyi +++ b/stubs/sklearn/datasets/_svmlight_format_io.pyi @@ -1,10 +1,6 @@ -import io -import os.path from contextlib import closing as closing from typing import IO, Literal -import numpy as np -import scipy.sparse as sp from numpy import dtype, ndarray from scipy.sparse import spmatrix diff --git a/stubs/sklearn/datasets/_twenty_newsgroups.pyi b/stubs/sklearn/datasets/_twenty_newsgroups.pyi index b959e9d9..fe3cf579 100644 --- a/stubs/sklearn/datasets/_twenty_newsgroups.pyi +++ b/stubs/sklearn/datasets/_twenty_newsgroups.pyi @@ -1,15 +1,5 @@ -import codecs -import logging -import os -import pickle -import re -import shutil -import tarfile from typing import Literal -import joblib -import numpy as np -import scipy.sparse as sp from numpy import ndarray from numpy.random import RandomState diff --git a/stubs/sklearn/datasets/setup.pyi b/stubs/sklearn/datasets/setup.pyi index d04223c2..62052209 100644 --- a/stubs/sklearn/datasets/setup.pyi +++ b/stubs/sklearn/datasets/setup.pyi @@ -1,8 +1,3 @@ -import os -import platform -import numpy -from numpy.distutils.core import setup -from numpy.distutils.misc_util import Configuration def configuration(parent_package: str = "", top_path=None): ... diff --git a/stubs/sklearn/decomposition/_base.pyi b/stubs/sklearn/decomposition/_base.pyi index cad9c845..72441af2 100644 --- a/stubs/sklearn/decomposition/_base.pyi +++ b/stubs/sklearn/decomposition/_base.pyi @@ -18,7 +18,6 @@ _BasePCA_Self = TypeVar("_BasePCA_Self", bound="_BasePCA") # # License: BSD 3 clause -import numpy as np class _BasePCA(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstimator, metaclass=ABCMeta): def get_covariance(self) -> ndarray: ... diff --git a/stubs/sklearn/decomposition/_dict_learning.pyi b/stubs/sklearn/decomposition/_dict_learning.pyi index d3ad4e40..9d67ff50 100644 --- a/stubs/sklearn/decomposition/_dict_learning.pyi +++ b/stubs/sklearn/decomposition/_dict_learning.pyi @@ -29,12 +29,7 @@ MiniBatchDictionaryLearning_Self = TypeVar("MiniBatchDictionaryLearning_Self", b # Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort # License: BSD 3 clause -import itertools -import sys -import time -import warnings -import numpy as np # XXX : could be moved to the linear_model module def sparse_encode( diff --git a/stubs/sklearn/decomposition/_factor_analysis.pyi b/stubs/sklearn/decomposition/_factor_analysis.pyi index 501721f6..d0f31431 100644 --- a/stubs/sklearn/decomposition/_factor_analysis.pyi +++ b/stubs/sklearn/decomposition/_factor_analysis.pyi @@ -22,9 +22,7 @@ FactorAnalysis_Self = TypeVar("FactorAnalysis_Self", bound="FactorAnalysis") # License: BSD3 -import warnings -import numpy as np class FactorAnalysis(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstimator): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/decomposition/_fastica.pyi b/stubs/sklearn/decomposition/_fastica.pyi index 9e41bfd7..37712f41 100644 --- a/stubs/sklearn/decomposition/_fastica.pyi +++ b/stubs/sklearn/decomposition/_fastica.pyi @@ -18,9 +18,7 @@ FastICA_Self = TypeVar("FastICA_Self", bound="FastICA") # Bertrand Thirion, Alexandre Gramfort, Denis A. Engemann # License: BSD 3 clause -import warnings -import numpy as np __all__ = ["fastica", "FastICA"] diff --git a/stubs/sklearn/decomposition/_incremental_pca.pyi b/stubs/sklearn/decomposition/_incremental_pca.pyi index d15d64fb..8d236d04 100644 --- a/stubs/sklearn/decomposition/_incremental_pca.pyi +++ b/stubs/sklearn/decomposition/_incremental_pca.pyi @@ -12,7 +12,6 @@ from ._base import _BasePCA IncrementalPCA_Self = TypeVar("IncrementalPCA_Self", bound="IncrementalPCA") -import numpy as np class IncrementalPCA(_BasePCA): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/decomposition/_kernel_pca.pyi b/stubs/sklearn/decomposition/_kernel_pca.pyi index a4367108..6350bc74 100644 --- a/stubs/sklearn/decomposition/_kernel_pca.pyi +++ b/stubs/sklearn/decomposition/_kernel_pca.pyi @@ -21,7 +21,6 @@ KernelPCA_Self = TypeVar("KernelPCA_Self", bound="KernelPCA") # Sylvain Marie # License: BSD 3 clause -import numpy as np class KernelPCA(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstimator): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/decomposition/_lda.pyi b/stubs/sklearn/decomposition/_lda.pyi index 29f1dabf..5199f91b 100644 --- a/stubs/sklearn/decomposition/_lda.pyi +++ b/stubs/sklearn/decomposition/_lda.pyi @@ -12,12 +12,9 @@ from ..utils import check_random_state as check_random_state, gen_batches as gen from ..utils._param_validation import Interval as Interval, StrOptions as StrOptions from ..utils.parallel import Parallel as Parallel, delayed as delayed from ..utils.validation import check_is_fitted as check_is_fitted, check_non_negative as check_non_negative -from ._online_lda_fast import mean_change as cy_mean_change LatentDirichletAllocation_Self = TypeVar("LatentDirichletAllocation_Self", bound="LatentDirichletAllocation") -import numpy as np -import scipy.sparse as sp EPS = ... diff --git a/stubs/sklearn/decomposition/_nmf.pyi b/stubs/sklearn/decomposition/_nmf.pyi index 96033410..9c24a660 100644 --- a/stubs/sklearn/decomposition/_nmf.pyi +++ b/stubs/sklearn/decomposition/_nmf.pyi @@ -20,12 +20,7 @@ from ..utils.validation import check_is_fitted as check_is_fitted, check_non_neg MiniBatchNMF_Self = TypeVar("MiniBatchNMF_Self", bound="MiniBatchNMF") _BaseNMF_Self = TypeVar("_BaseNMF_Self", bound="_BaseNMF") -import itertools -import time -import warnings -import numpy as np -import scipy.sparse as sp EPSILON = ... diff --git a/stubs/sklearn/decomposition/_pca.pyi b/stubs/sklearn/decomposition/_pca.pyi index 77f7a8b3..f837f779 100644 --- a/stubs/sklearn/decomposition/_pca.pyi +++ b/stubs/sklearn/decomposition/_pca.pyi @@ -24,7 +24,6 @@ from ._base import _BasePCA PCA_Self = TypeVar("PCA_Self", bound="PCA") -import numpy as np class PCA(_BasePCA): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/decomposition/_sparse_pca.pyi b/stubs/sklearn/decomposition/_sparse_pca.pyi index c5222583..e080ea51 100644 --- a/stubs/sklearn/decomposition/_sparse_pca.pyi +++ b/stubs/sklearn/decomposition/_sparse_pca.pyi @@ -15,7 +15,6 @@ from ._dict_learning import MiniBatchDictionaryLearning as MiniBatchDictionaryLe _BaseSparsePCA_Self = TypeVar("_BaseSparsePCA_Self", bound="_BaseSparsePCA") -import numpy as np class _BaseSparsePCA(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstimator): _parameter_constraints: ClassVar[dict] = ... diff --git a/stubs/sklearn/decomposition/_truncated_svd.pyi b/stubs/sklearn/decomposition/_truncated_svd.pyi index 68d207b3..379759cc 100644 --- a/stubs/sklearn/decomposition/_truncated_svd.pyi +++ b/stubs/sklearn/decomposition/_truncated_svd.pyi @@ -15,8 +15,6 @@ from ..utils.validation import check_is_fitted as check_is_fitted TruncatedSVD_Self = TypeVar("TruncatedSVD_Self", bound="TruncatedSVD") -import numpy as np -import scipy.sparse as sp __all__ = ["TruncatedSVD"] diff --git a/stubs/sklearn/decomposition/setup.pyi b/stubs/sklearn/decomposition/setup.pyi index 30795b9f..62052209 100644 --- a/stubs/sklearn/decomposition/setup.pyi +++ b/stubs/sklearn/decomposition/setup.pyi @@ -1,7 +1,3 @@ -import os -import numpy -from numpy.distutils.core import setup -from numpy.distutils.misc_util import Configuration def configuration(parent_package: str = "", top_path=None): ... diff --git a/stubs/sklearn/discriminant_analysis.pyi b/stubs/sklearn/discriminant_analysis.pyi index 0302a63e..ec583969 100644 --- a/stubs/sklearn/discriminant_analysis.pyi +++ b/stubs/sklearn/discriminant_analysis.pyi @@ -2,7 +2,6 @@ from numbers import Integral as Integral, Real as Real from typing import ClassVar, Literal, TypeVar from numpy import ndarray -from scipy import linalg from ._typing import ArrayLike, Float, Int, MatrixLike from .base import BaseEstimator, ClassifierMixin, ClassNamePrefixFeaturesOutMixin, TransformerMixin @@ -30,10 +29,7 @@ QuadraticDiscriminantAnalysis_Self = TypeVar("QuadraticDiscriminantAnalysis_Self # License: BSD 3-Clause -import warnings -import numpy as np -import scipy.linalg __all__ = ["LinearDiscriminantAnalysis", "QuadraticDiscriminantAnalysis"] diff --git a/stubs/sklearn/dummy.pyi b/stubs/sklearn/dummy.pyi index 9c5d91d2..8e58a2fd 100644 --- a/stubs/sklearn/dummy.pyi +++ b/stubs/sklearn/dummy.pyi @@ -23,10 +23,7 @@ DummyClassifier_Self = TypeVar("DummyClassifier_Self", bound="DummyClassifier") # Maheshakya Wijewardena # License: BSD 3 clause -import warnings -import numpy as np -import scipy.sparse as sp class DummyClassifier(MultiOutputMixin, ClassifierMixin, BaseEstimator): sparse_output_: bool = ... diff --git a/stubs/sklearn/ensemble/_bagging.pyi b/stubs/sklearn/ensemble/_bagging.pyi index 01302115..3dc448a8 100644 --- a/stubs/sklearn/ensemble/_bagging.pyi +++ b/stubs/sklearn/ensemble/_bagging.pyi @@ -25,10 +25,7 @@ BaseBagging_Self = TypeVar("BaseBagging_Self", bound="BaseBagging") # Author: Gilles Louppe # License: BSD 3 clause -import itertools -import numbers -import numpy as np __all__ = ["BaggingClassifier", "BaggingRegressor"] diff --git a/stubs/sklearn/ensemble/_base.pyi b/stubs/sklearn/ensemble/_base.pyi index 30293fbe..63742ef5 100644 --- a/stubs/sklearn/ensemble/_base.pyi +++ b/stubs/sklearn/ensemble/_base.pyi @@ -15,9 +15,7 @@ from ..utils.metaestimators import _BaseComposition _BaseHeterogeneousEnsemble_Self = TypeVar("_BaseHeterogeneousEnsemble_Self", bound="_BaseHeterogeneousEnsemble") -import warnings -import numpy as np class BaseEnsemble(MetaEstimatorMixin, BaseEstimator, metaclass=ABCMeta): estimators_: list[BaseEstimator] = ... diff --git a/stubs/sklearn/ensemble/_forest.pyi b/stubs/sklearn/ensemble/_forest.pyi index a3abcce2..7c13b001 100644 --- a/stubs/sklearn/ensemble/_forest.pyi +++ b/stubs/sklearn/ensemble/_forest.pyi @@ -5,7 +5,7 @@ from warnings import catch_warnings as catch_warnings, simplefilter as simplefil from numpy import ndarray from numpy.random import RandomState -from scipy.sparse import hstack as sparse_hstack, issparse as issparse, spmatrix +from scipy.sparse import issparse as issparse, spmatrix from .._typing import ArrayLike, Float, Int, MatrixLike from ..base import ClassifierMixin, MultiOutputMixin, RegressorMixin, TransformerMixin, is_classifier as is_classifier @@ -30,9 +30,7 @@ from ._base import BaseEnsemble BaseForest_Self = TypeVar("BaseForest_Self", bound="BaseForest") RandomTreesEmbedding_Self = TypeVar("RandomTreesEmbedding_Self", bound="RandomTreesEmbedding") -import threading -import numpy as np __all__ = [ "RandomForestClassifier", diff --git a/stubs/sklearn/ensemble/_gb.pyi b/stubs/sklearn/ensemble/_gb.pyi index 8f5f3f24..d0ccdfa8 100644 --- a/stubs/sklearn/ensemble/_gb.pyi +++ b/stubs/sklearn/ensemble/_gb.pyi @@ -23,9 +23,7 @@ from ._gradient_boosting import predict_stage as predict_stage, predict_stages a BaseGradientBoosting_Self = TypeVar("BaseGradientBoosting_Self", bound="BaseGradientBoosting") -import warnings -import numpy as np class VerboseReporter: def __init__(self, verbose: Int) -> None: ... diff --git a/stubs/sklearn/ensemble/_gb_losses.pyi b/stubs/sklearn/ensemble/_gb_losses.pyi index ba85a5a3..55a3d555 100644 --- a/stubs/sklearn/ensemble/_gb_losses.pyi +++ b/stubs/sklearn/ensemble/_gb_losses.pyi @@ -1,7 +1,6 @@ from abc import ABCMeta, abstractmethod from typing import Any, ClassVar -import numpy as np from numpy import ndarray from scipy.special import expit as expit, logsumexp as logsumexp diff --git a/stubs/sklearn/ensemble/_hist_gradient_boosting/binning.pyi b/stubs/sklearn/ensemble/_hist_gradient_boosting/binning.pyi index fd69d2ca..1a14a009 100644 --- a/stubs/sklearn/ensemble/_hist_gradient_boosting/binning.pyi +++ b/stubs/sklearn/ensemble/_hist_gradient_boosting/binning.pyi @@ -20,7 +20,6 @@ _BinMapper_Self = TypeVar("_BinMapper_Self", bound="_BinMapper") # Author: Nicolas Hug -import numpy as np class _BinMapper(TransformerMixin, BaseEstimator): missing_values_bin_idx_: uint8 = ... diff --git a/stubs/sklearn/ensemble/_hist_gradient_boosting/common.pyi b/stubs/sklearn/ensemble/_hist_gradient_boosting/common.pyi index f3997c74..60f86fcb 100644 --- a/stubs/sklearn/ensemble/_hist_gradient_boosting/common.pyi +++ b/stubs/sklearn/ensemble/_hist_gradient_boosting/common.pyi @@ -1,10 +1,7 @@ import numpy as np from numpy import ( - float32 as G_H_DTYPE, - float32 as X_BITSET_INNER_DTYPE, float64 as X_DTYPE, float64 as Y_DTYPE, - uint8 as X_BINNED_DTYPE_C, uint32 as X_BINNED_DTYPE, ) diff --git a/stubs/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.pyi b/stubs/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.pyi index a5d0b9e9..c0e0f1ba 100644 --- a/stubs/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.pyi +++ b/stubs/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.pyi @@ -1,7 +1,6 @@ from abc import ABC, abstractmethod from functools import partial as partial from numbers import Integral as Integral, Real as Real -from timeit import default_timer as time from typing import Callable, ClassVar, Literal, Mapping, Sequence, TypeVar from numpy import ndarray @@ -33,10 +32,7 @@ from .grower import TreeGrower as TreeGrower BaseHistGradientBoosting_Self = TypeVar("BaseHistGradientBoosting_Self", bound="BaseHistGradientBoosting") -import itertools -import warnings -import numpy as np _LOSSES = ... diff --git a/stubs/sklearn/ensemble/_hist_gradient_boosting/grower.pyi b/stubs/sklearn/ensemble/_hist_gradient_boosting/grower.pyi index 4e008527..f5124e10 100644 --- a/stubs/sklearn/ensemble/_hist_gradient_boosting/grower.pyi +++ b/stubs/sklearn/ensemble/_hist_gradient_boosting/grower.pyi @@ -1,9 +1,6 @@ -import numbers from heapq import heappop as heappop, heappush as heappush -from timeit import default_timer as time from typing import ClassVar -import numpy as np from numpy import ndarray from ..._typing import ArrayLike, Float, Int, MatrixLike diff --git a/stubs/sklearn/ensemble/_hist_gradient_boosting/predictor.pyi b/stubs/sklearn/ensemble/_hist_gradient_boosting/predictor.pyi index 13494417..71f2e212 100644 --- a/stubs/sklearn/ensemble/_hist_gradient_boosting/predictor.pyi +++ b/stubs/sklearn/ensemble/_hist_gradient_boosting/predictor.pyi @@ -1,4 +1,3 @@ -import numpy as np from numpy import ndarray from ..._typing import ArrayLike, Int, MatrixLike diff --git a/stubs/sklearn/ensemble/_iforest.pyi b/stubs/sklearn/ensemble/_iforest.pyi index 097059ed..5189231c 100644 --- a/stubs/sklearn/ensemble/_iforest.pyi +++ b/stubs/sklearn/ensemble/_iforest.pyi @@ -9,7 +9,6 @@ from scipy.sparse import issparse as issparse from .._typing import ArrayLike, Int, MatrixLike from ..base import OutlierMixin from ..tree import ExtraTreeRegressor -from ..tree._tree import DTYPE as tree_dtype from ..utils import ( check_array as check_array, check_random_state as check_random_state, @@ -26,9 +25,7 @@ IsolationForest_Self = TypeVar("IsolationForest_Self", bound="IsolationForest") # Alexandre Gramfort # License: BSD 3 clause -import numbers -import numpy as np __all__ = ["IsolationForest"] diff --git a/stubs/sklearn/ensemble/_stacking.pyi b/stubs/sklearn/ensemble/_stacking.pyi index 49e3af3a..7445636f 100644 --- a/stubs/sklearn/ensemble/_stacking.pyi +++ b/stubs/sklearn/ensemble/_stacking.pyi @@ -34,8 +34,6 @@ _BaseStacking_Self = TypeVar("_BaseStacking_Self", bound="_BaseStacking") StackingRegressor_Self = TypeVar("StackingRegressor_Self", bound="StackingRegressor") StackingClassifier_Self = TypeVar("StackingClassifier_Self", bound="StackingClassifier") -import numpy as np -import scipy.sparse as sparse class _BaseStacking(TransformerMixin, _BaseHeterogeneousEnsemble, metaclass=ABCMeta): _parameter_constraints: ClassVar[dict] = ... diff --git a/stubs/sklearn/ensemble/_voting.pyi b/stubs/sklearn/ensemble/_voting.pyi index de5ceb00..5c79ec18 100644 --- a/stubs/sklearn/ensemble/_voting.pyi +++ b/stubs/sklearn/ensemble/_voting.pyi @@ -19,7 +19,6 @@ from ._base import _BaseHeterogeneousEnsemble VotingClassifier_Self = TypeVar("VotingClassifier_Self", bound="VotingClassifier") VotingRegressor_Self = TypeVar("VotingRegressor_Self", bound="VotingRegressor") -import numpy as np class _BaseVoting(TransformerMixin, _BaseHeterogeneousEnsemble): _parameter_constraints: ClassVar[dict] = ... diff --git a/stubs/sklearn/ensemble/_weight_boosting.pyi b/stubs/sklearn/ensemble/_weight_boosting.pyi index f6c64b29..e3a7a221 100644 --- a/stubs/sklearn/ensemble/_weight_boosting.pyi +++ b/stubs/sklearn/ensemble/_weight_boosting.pyi @@ -18,9 +18,7 @@ from ._base import BaseEnsemble BaseWeightBoosting_Self = TypeVar("BaseWeightBoosting_Self", bound="BaseWeightBoosting") -import warnings -import numpy as np __all__ = [ "AdaBoostClassifier", diff --git a/stubs/sklearn/ensemble/setup.pyi b/stubs/sklearn/ensemble/setup.pyi index f10f2e92..1be379ff 100644 --- a/stubs/sklearn/ensemble/setup.pyi +++ b/stubs/sklearn/ensemble/setup.pyi @@ -1,5 +1,2 @@ -import numpy -from numpy.distutils.core import setup -from numpy.distutils.misc_util import Configuration def configuration(parent_package: str = "", top_path=None): ... diff --git a/stubs/sklearn/experimental/enable_hist_gradient_boosting.pyi b/stubs/sklearn/experimental/enable_hist_gradient_boosting.pyi index aee104c7..6073e09e 100644 --- a/stubs/sklearn/experimental/enable_hist_gradient_boosting.pyi +++ b/stubs/sklearn/experimental/enable_hist_gradient_boosting.pyi @@ -1,4 +1,2 @@ # Don't remove this file, we don't want to break users code just because the # feature isn't experimental anymore. - -import warnings diff --git a/stubs/sklearn/externals/_arff.pyi b/stubs/sklearn/externals/_arff.pyi index 879278f8..ed6f0410 100644 --- a/stubs/sklearn/externals/_arff.pyi +++ b/stubs/sklearn/externals/_arff.pyi @@ -31,8 +31,6 @@ __author__: Literal["Renato de Pontes Pereira, Matthias Feurer, Joel Nothman"] = __author_email__: str = ... __version__: str = ... -import csv -import re # CONSTANTS =================================================================== _SIMPLE_TYPES: list = ... diff --git a/stubs/sklearn/externals/_lobpcg.pyi b/stubs/sklearn/externals/_lobpcg.pyi index e8f00e68..aa6e49d3 100644 --- a/stubs/sklearn/externals/_lobpcg.pyi +++ b/stubs/sklearn/externals/_lobpcg.pyi @@ -1,9 +1,6 @@ -import inspect -import warnings from typing import Callable -import numpy as np -from numpy import block as bmat, ndarray +from numpy import ndarray from scipy.linalg import ( LinAlgError as LinAlgError, cho_factor as cho_factor, diff --git a/stubs/sklearn/externals/_numpy_compiler_patch.pyi b/stubs/sklearn/externals/_numpy_compiler_patch.pyi index 208e02fe..69d295af 100644 --- a/stubs/sklearn/externals/_numpy_compiler_patch.pyi +++ b/stubs/sklearn/externals/_numpy_compiler_patch.pyi @@ -9,15 +9,8 @@ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -import os -import re -import subprocess -import sys -from distutils.errors import DistutilsExecError from typing import Mapping, Sequence -from numpy.distutils import log - # Copyright (c) 2005-2022, NumPy Developers. # All rights reserved. diff --git a/stubs/sklearn/feature_extraction/_dict_vectorizer.pyi b/stubs/sklearn/feature_extraction/_dict_vectorizer.pyi index 05d9de3c..f4ab2518 100644 --- a/stubs/sklearn/feature_extraction/_dict_vectorizer.pyi +++ b/stubs/sklearn/feature_extraction/_dict_vectorizer.pyi @@ -17,8 +17,6 @@ DictVectorizer_Self = TypeVar("DictVectorizer_Self", bound="DictVectorizer") # Dan Blanchard # License: BSD 3 clause -import numpy as np -import scipy.sparse as sp class DictVectorizer(TransformerMixin, BaseEstimator): feature_names_: list = ... diff --git a/stubs/sklearn/feature_extraction/_hash.pyi b/stubs/sklearn/feature_extraction/_hash.pyi index ae6e1570..82af5815 100644 --- a/stubs/sklearn/feature_extraction/_hash.pyi +++ b/stubs/sklearn/feature_extraction/_hash.pyi @@ -8,15 +8,12 @@ from scipy.sparse import spmatrix from .._typing import Int from ..base import BaseEstimator, TransformerMixin from ..utils._param_validation import Interval as Interval, StrOptions as StrOptions -from ._hashing_fast import transform as _hashing_transform FeatureHasher_Self = TypeVar("FeatureHasher_Self", bound="FeatureHasher") # Author: Lars Buitinck # License: BSD 3 clause -import numpy as np -import scipy.sparse as sp class FeatureHasher(TransformerMixin, BaseEstimator): _parameter_constraints: ClassVar[dict] = ... diff --git a/stubs/sklearn/feature_extraction/image.pyi b/stubs/sklearn/feature_extraction/image.pyi index 7848ec3e..c758c72b 100644 --- a/stubs/sklearn/feature_extraction/image.pyi +++ b/stubs/sklearn/feature_extraction/image.pyi @@ -16,7 +16,6 @@ from ..utils._param_validation import Interval as Interval PatchExtractor_Self = TypeVar("PatchExtractor_Self", bound="PatchExtractor") -import numpy as np __all__ = [ "PatchExtractor", diff --git a/stubs/sklearn/feature_extraction/setup.pyi b/stubs/sklearn/feature_extraction/setup.pyi index ba0b204e..62052209 100644 --- a/stubs/sklearn/feature_extraction/setup.pyi +++ b/stubs/sklearn/feature_extraction/setup.pyi @@ -1,5 +1,3 @@ -import os -from numpy.distutils.misc_util import Configuration def configuration(parent_package: str = "", top_path=None): ... diff --git a/stubs/sklearn/feature_extraction/text.pyi b/stubs/sklearn/feature_extraction/text.pyi index e24dca56..398244c4 100644 --- a/stubs/sklearn/feature_extraction/text.pyi +++ b/stubs/sklearn/feature_extraction/text.pyi @@ -31,13 +31,7 @@ TfidfTransformer_Self = TypeVar("TfidfTransformer_Self", bound="TfidfTransformer # # License: BSD 3 clause -import array -import re -import unicodedata -import warnings -import numpy as np -import scipy.sparse as sp __all__ = [ "HashingVectorizer", diff --git a/stubs/sklearn/feature_selection/_base.pyi b/stubs/sklearn/feature_selection/_base.pyi index 9a30534c..aba7f8f9 100644 --- a/stubs/sklearn/feature_selection/_base.pyi +++ b/stubs/sklearn/feature_selection/_base.pyi @@ -1,8 +1,6 @@ -import warnings from abc import ABCMeta, abstractmethod as abstractmethod from operator import attrgetter as attrgetter -import numpy as np from numpy import ndarray from scipy.sparse import csc_matrix as csc_matrix, issparse as issparse from scipy.sparse._csr import csr_matrix diff --git a/stubs/sklearn/feature_selection/_from_model.pyi b/stubs/sklearn/feature_selection/_from_model.pyi index 6bc241a4..b2d9b4a1 100644 --- a/stubs/sklearn/feature_selection/_from_model.pyi +++ b/stubs/sklearn/feature_selection/_from_model.pyi @@ -17,7 +17,6 @@ SelectFromModel_Self = TypeVar("SelectFromModel_Self", bound="SelectFromModel") # Authors: Gilles Louppe, Mathieu Blondel, Maheshakya Wijewardena # License: BSD 3 clause -import numpy as np class SelectFromModel(MetaEstimatorMixin, SelectorMixin, BaseEstimator): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/feature_selection/_mutual_info.pyi b/stubs/sklearn/feature_selection/_mutual_info.pyi index b4681198..4bb5a571 100644 --- a/stubs/sklearn/feature_selection/_mutual_info.pyi +++ b/stubs/sklearn/feature_selection/_mutual_info.pyi @@ -1,6 +1,5 @@ from typing import Literal -import numpy as np from numpy import ndarray from numpy.random import RandomState from scipy.sparse import issparse as issparse diff --git a/stubs/sklearn/feature_selection/_rfe.pyi b/stubs/sklearn/feature_selection/_rfe.pyi index 2ae39e6c..55d550cf 100644 --- a/stubs/sklearn/feature_selection/_rfe.pyi +++ b/stubs/sklearn/feature_selection/_rfe.pyi @@ -25,7 +25,6 @@ RFE_Self = TypeVar("RFE_Self", bound="RFE") # # License: BSD 3 clause -import numpy as np class RFE(SelectorMixin, MetaEstimatorMixin, BaseEstimator): support_: ndarray = ... diff --git a/stubs/sklearn/feature_selection/_sequential.pyi b/stubs/sklearn/feature_selection/_sequential.pyi index 05a022f8..79584d77 100644 --- a/stubs/sklearn/feature_selection/_sequential.pyi +++ b/stubs/sklearn/feature_selection/_sequential.pyi @@ -14,9 +14,7 @@ from ._base import SelectorMixin SequentialFeatureSelector_Self = TypeVar("SequentialFeatureSelector_Self", bound="SequentialFeatureSelector") -import warnings -import numpy as np class SequentialFeatureSelector(SelectorMixin, MetaEstimatorMixin, BaseEstimator): support_: ndarray = ... diff --git a/stubs/sklearn/feature_selection/_univariate_selection.pyi b/stubs/sklearn/feature_selection/_univariate_selection.pyi index 45e7a30e..b9ffc425 100644 --- a/stubs/sklearn/feature_selection/_univariate_selection.pyi +++ b/stubs/sklearn/feature_selection/_univariate_selection.pyi @@ -3,7 +3,7 @@ from typing import Callable, ClassVar, Literal, TypeVar from joblib.memory import MemorizedFunc from numpy import ndarray -from scipy import special as special, stats +from scipy import special as special from scipy.sparse import issparse as issparse from .._typing import ArrayLike, Float, Int, MatrixLike @@ -27,9 +27,7 @@ _BaseFilter_Self = TypeVar("_BaseFilter_Self", bound="_BaseFilter") # L. Buitinck, A. Joly # License: BSD 3 clause -import warnings -import numpy as np ###################################################################### # Scoring functions diff --git a/stubs/sklearn/feature_selection/_variance_threshold.pyi b/stubs/sklearn/feature_selection/_variance_threshold.pyi index d990c96e..baa61f9d 100644 --- a/stubs/sklearn/feature_selection/_variance_threshold.pyi +++ b/stubs/sklearn/feature_selection/_variance_threshold.pyi @@ -15,7 +15,6 @@ VarianceThreshold_Self = TypeVar("VarianceThreshold_Self", bound="VarianceThresh # Author: Lars Buitinck # License: 3-clause BSD -import numpy as np class VarianceThreshold(SelectorMixin, BaseEstimator): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/gaussian_process/_gpc.pyi b/stubs/sklearn/gaussian_process/_gpc.pyi index 2d36262e..8f338246 100644 --- a/stubs/sklearn/gaussian_process/_gpc.pyi +++ b/stubs/sklearn/gaussian_process/_gpc.pyi @@ -5,7 +5,7 @@ from typing import Any, Callable, ClassVar, Literal, TypeVar from numpy import ndarray from numpy.random import RandomState from scipy.linalg import cho_solve as cho_solve, cholesky as cholesky, solve as solve -from scipy.special import erf, expit as expit +from scipy.special import expit as expit from .._typing import ArrayLike, Float, Int, MatrixLike from ..base import BaseEstimator, ClassifierMixin, clone as clone @@ -14,7 +14,7 @@ from ..preprocessing import LabelEncoder as LabelEncoder from ..utils import check_random_state as check_random_state from ..utils._param_validation import Interval as Interval, StrOptions as StrOptions from ..utils.validation import check_is_fitted as check_is_fitted -from .kernels import RBF as RBF, CompoundKernel as CompoundKernel, ConstantKernel as C, Kernel, Product +from .kernels import RBF as RBF, CompoundKernel as CompoundKernel, Kernel, Product _BinaryGaussianProcessClassifierLaplace_Self = TypeVar( "_BinaryGaussianProcessClassifierLaplace_Self", @@ -22,8 +22,6 @@ _BinaryGaussianProcessClassifierLaplace_Self = TypeVar( ) GaussianProcessClassifier_Self = TypeVar("GaussianProcessClassifier_Self", bound="GaussianProcessClassifier") -import numpy as np -import scipy.optimize # Values required for approximating the logistic sigmoid by # error functions. coefs are obtained via: diff --git a/stubs/sklearn/gaussian_process/_gpr.pyi b/stubs/sklearn/gaussian_process/_gpr.pyi index c1e2ef3f..fa7a9b7f 100644 --- a/stubs/sklearn/gaussian_process/_gpr.pyi +++ b/stubs/sklearn/gaussian_process/_gpr.pyi @@ -10,7 +10,7 @@ from .._typing import ArrayLike, Float, Int, MatrixLike from ..base import BaseEstimator, MultiOutputMixin, RegressorMixin, clone as clone from ..utils import check_random_state as check_random_state from ..utils._param_validation import Interval as Interval, StrOptions as StrOptions -from .kernels import RBF as RBF, ConstantKernel as C, Kernel +from .kernels import RBF as RBF, Kernel GaussianProcessRegressor_Self = TypeVar("GaussianProcessRegressor_Self", bound="GaussianProcessRegressor") @@ -18,10 +18,7 @@ GaussianProcessRegressor_Self = TypeVar("GaussianProcessRegressor_Self", bound=" # Modified by: Pete Green # License: BSD 3 clause -import warnings -import numpy as np -import scipy.optimize GPR_CHOLESKY_LOWER: bool = ... diff --git a/stubs/sklearn/gaussian_process/kernels.pyi b/stubs/sklearn/gaussian_process/kernels.pyi index c0656e7a..fc8d45fe 100644 --- a/stubs/sklearn/gaussian_process/kernels.pyi +++ b/stubs/sklearn/gaussian_process/kernels.pyi @@ -5,7 +5,7 @@ from typing import Callable, Literal, Sequence, TypeVar from numpy import ndarray from scipy.spatial.distance import cdist as cdist, pdist as pdist, squareform as squareform -from scipy.special import gamma, kv as kv +from scipy.special import kv as kv from .._typing import ArrayLike, Float, MatrixLike from ..base import clone as clone @@ -15,10 +15,7 @@ from ..metrics.pairwise import pairwise_kernels as pairwise_kernels Kernel_Self = TypeVar("Kernel_Self", bound="Kernel") Hyperparameter_Self = TypeVar("Hyperparameter_Self", bound="Hyperparameter") -import math -import warnings -import numpy as np class Hyperparameter(namedtuple("Hyperparameter", ("name", "value_type", "bounds", "n_elements", "fixed"))): fixed: bool = ... diff --git a/stubs/sklearn/impute/_base.pyi b/stubs/sklearn/impute/_base.pyi index 53a3c935..2a765786 100644 --- a/stubs/sklearn/impute/_base.pyi +++ b/stubs/sklearn/impute/_base.pyi @@ -2,7 +2,6 @@ from collections import Counter as Counter from typing import Any, ClassVar, Literal, TypeVar from numpy import ndarray -from scipy import sparse as sp from scipy.sparse import spmatrix from .._typing import ArrayLike, Int, MatrixLike @@ -18,11 +17,7 @@ MissingIndicator_Self = TypeVar("MissingIndicator_Self", bound="MissingIndicator # Sergey Feldman # License: BSD 3 clause -import numbers -import warnings -import numpy as np -import numpy.ma as ma class _BaseImputer(TransformerMixin, BaseEstimator): _parameter_constraints: ClassVar[dict] = ... diff --git a/stubs/sklearn/impute/_iterative.pyi b/stubs/sklearn/impute/_iterative.pyi index 905012a2..b022bad8 100644 --- a/stubs/sklearn/impute/_iterative.pyi +++ b/stubs/sklearn/impute/_iterative.pyi @@ -19,9 +19,7 @@ from ._base import MissingIndicator, SimpleImputer, _BaseImputer IterativeImputer_Self = TypeVar("IterativeImputer_Self", bound="IterativeImputer") -import warnings -import numpy as np _ImputerTriplet = ... diff --git a/stubs/sklearn/impute/_knn.pyi b/stubs/sklearn/impute/_knn.pyi index 2ec52725..24e25b99 100644 --- a/stubs/sklearn/impute/_knn.pyi +++ b/stubs/sklearn/impute/_knn.pyi @@ -16,7 +16,6 @@ KNNImputer_Self = TypeVar("KNNImputer_Self", bound="KNNImputer") # Thomas J Fan # License: BSD 3 clause -import numpy as np class KNNImputer(_BaseImputer): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/inspection/_partial_dependence.pyi b/stubs/sklearn/inspection/_partial_dependence.pyi index 7eb10e18..ef6645ac 100644 --- a/stubs/sklearn/inspection/_partial_dependence.pyi +++ b/stubs/sklearn/inspection/_partial_dependence.pyi @@ -1,7 +1,6 @@ from collections.abc import Iterable as Iterable from typing import Literal, Sequence -import numpy as np from scipy import sparse as sparse from scipy.stats.mstats import mquantiles as mquantiles diff --git a/stubs/sklearn/inspection/_permutation_importance.pyi b/stubs/sklearn/inspection/_permutation_importance.pyi index 4dba8188..562bb9c0 100644 --- a/stubs/sklearn/inspection/_permutation_importance.pyi +++ b/stubs/sklearn/inspection/_permutation_importance.pyi @@ -1,7 +1,5 @@ -import numbers from typing import Any, Callable, Mapping -import numpy as np from numpy.random import RandomState from .._typing import ArrayLike, Int, MatrixLike diff --git a/stubs/sklearn/inspection/_plot/decision_boundary.pyi b/stubs/sklearn/inspection/_plot/decision_boundary.pyi index d7e0049d..89b8672d 100644 --- a/stubs/sklearn/inspection/_plot/decision_boundary.pyi +++ b/stubs/sklearn/inspection/_plot/decision_boundary.pyi @@ -1,7 +1,6 @@ from functools import reduce as reduce from typing import Any, Literal -import numpy as np from matplotlib.axes import Axes from matplotlib.collections import QuadMesh from matplotlib.contour import QuadContourSet diff --git a/stubs/sklearn/inspection/_plot/partial_dependence.pyi b/stubs/sklearn/inspection/_plot/partial_dependence.pyi index 7f65a4d0..96467e05 100644 --- a/stubs/sklearn/inspection/_plot/partial_dependence.pyi +++ b/stubs/sklearn/inspection/_plot/partial_dependence.pyi @@ -1,10 +1,7 @@ -import numbers -import warnings from itertools import chain as chain from math import ceil as ceil from typing import Literal, Mapping, Sequence -import numpy as np from matplotlib.axes import Axes from matplotlib.figure import Figure from matplotlib.gridspec import GridSpecFromSubplotSpec as GridSpecFromSubplotSpec diff --git a/stubs/sklearn/inspection/setup.pyi b/stubs/sklearn/inspection/setup.pyi index 436f4022..1be379ff 100644 --- a/stubs/sklearn/inspection/setup.pyi +++ b/stubs/sklearn/inspection/setup.pyi @@ -1,4 +1,2 @@ -from numpy.distutils.core import setup -from numpy.distutils.misc_util import Configuration def configuration(parent_package: str = "", top_path=None): ... diff --git a/stubs/sklearn/isotonic.pyi b/stubs/sklearn/isotonic.pyi index 2f718839..19ea84cf 100644 --- a/stubs/sklearn/isotonic.pyi +++ b/stubs/sklearn/isotonic.pyi @@ -17,10 +17,7 @@ IsotonicRegression_Self = TypeVar("IsotonicRegression_Self", bound="IsotonicRegr # Nelle Varoquaux # License: BSD 3 clause -import math -import warnings -import numpy as np __all__ = ["check_increasing", "isotonic_regression", "IsotonicRegression"] diff --git a/stubs/sklearn/kernel_approximation.pyi b/stubs/sklearn/kernel_approximation.pyi index d529ebb4..3980916f 100644 --- a/stubs/sklearn/kernel_approximation.pyi +++ b/stubs/sklearn/kernel_approximation.pyi @@ -25,10 +25,7 @@ AdditiveChi2Sampler_Self = TypeVar("AdditiveChi2Sampler_Self", bound="AdditiveCh RBFSampler_Self = TypeVar("RBFSampler_Self", bound="RBFSampler") Nystroem_Self = TypeVar("Nystroem_Self", bound="Nystroem") -import warnings -import numpy as np -import scipy.sparse as sp class PolynomialCountSketch(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstimator): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/kernel_ridge.pyi b/stubs/sklearn/kernel_ridge.pyi index 3898d082..f8906dbc 100644 --- a/stubs/sklearn/kernel_ridge.pyi +++ b/stubs/sklearn/kernel_ridge.pyi @@ -12,7 +12,6 @@ from .utils.validation import check_is_fitted as check_is_fitted KernelRidge_Self = TypeVar("KernelRidge_Self", bound="KernelRidge") -import numpy as np class KernelRidge(MultiOutputMixin, RegressorMixin, BaseEstimator): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/linear_model/_base.pyi b/stubs/sklearn/linear_model/_base.pyi index c4a2567b..9c79c0f9 100644 --- a/stubs/sklearn/linear_model/_base.pyi +++ b/stubs/sklearn/linear_model/_base.pyi @@ -4,7 +4,7 @@ from typing import ClassVar, TypeVar from numpy import ndarray from numpy.random.mtrand import RandomState -from scipy import linalg as linalg, optimize as optimize, sparse +from scipy import linalg as linalg, optimize as optimize from scipy.sparse.linalg import lsqr as lsqr from scipy.special import expit as expit @@ -22,11 +22,7 @@ from ._stochastic_gradient import SGDClassifier LinearRegression_Self = TypeVar("LinearRegression_Self", bound="LinearRegression") SparseCoefMixin_Self = TypeVar("SparseCoefMixin_Self", bound="SparseCoefMixin") -import numbers -import warnings -import numpy as np -import scipy.sparse as sp # TODO: bayesian_ridge_regression and bayesian_regression_ard # should be squashed into its respective objects. diff --git a/stubs/sklearn/linear_model/_bayes.pyi b/stubs/sklearn/linear_model/_bayes.pyi index c5f76cd5..1005e16a 100644 --- a/stubs/sklearn/linear_model/_bayes.pyi +++ b/stubs/sklearn/linear_model/_bayes.pyi @@ -15,7 +15,6 @@ from ._base import LinearModel BayesianRidge_Self = TypeVar("BayesianRidge_Self", bound="BayesianRidge") ARDRegression_Self = TypeVar("ARDRegression_Self", bound="ARDRegression") -import numpy as np ############################################################################### # BayesianRidge regression diff --git a/stubs/sklearn/linear_model/_coordinate_descent.pyi b/stubs/sklearn/linear_model/_coordinate_descent.pyi index d89a66fe..437d2d05 100644 --- a/stubs/sklearn/linear_model/_coordinate_descent.pyi +++ b/stubs/sklearn/linear_model/_coordinate_descent.pyi @@ -39,11 +39,7 @@ MultiTaskElasticNet_Self = TypeVar("MultiTaskElasticNet_Self", bound="MultiTaskE # # License: BSD 3 clause -import numbers -import sys -import warnings -import numpy as np def lasso_path( X: MatrixLike | ArrayLike, diff --git a/stubs/sklearn/linear_model/_glm/_newton_solver.pyi b/stubs/sklearn/linear_model/_glm/_newton_solver.pyi index 24d9d5a7..07ae9790 100644 --- a/stubs/sklearn/linear_model/_glm/_newton_solver.pyi +++ b/stubs/sklearn/linear_model/_glm/_newton_solver.pyi @@ -1,9 +1,5 @@ -import warnings from abc import ABC, abstractmethod -import numpy as np -import scipy.linalg -import scipy.optimize from numpy import ndarray from scipy.sparse._csr import csr_matrix diff --git a/stubs/sklearn/linear_model/_glm/glm.pyi b/stubs/sklearn/linear_model/_glm/glm.pyi index 99ab2e14..85f92a4b 100644 --- a/stubs/sklearn/linear_model/_glm/glm.pyi +++ b/stubs/sklearn/linear_model/_glm/glm.pyi @@ -18,12 +18,10 @@ from ...utils import check_array as check_array, deprecated from ...utils._param_validation import Hidden as Hidden, Interval as Interval, StrOptions as StrOptions from ...utils.validation import check_is_fitted as check_is_fitted from .._linear_loss import LinearModelLoss as LinearModelLoss -from ._newton_solver import NewtonCholeskySolver as NewtonCholeskySolver, NewtonSolver +from ._newton_solver import NewtonCholeskySolver as NewtonCholeskySolver _GeneralizedLinearRegressor_Self = TypeVar("_GeneralizedLinearRegressor_Self", bound="_GeneralizedLinearRegressor") -import numpy as np -import scipy.optimize class _GeneralizedLinearRegressor(RegressorMixin, BaseEstimator): _base_loss: BaseLoss = ... diff --git a/stubs/sklearn/linear_model/_huber.pyi b/stubs/sklearn/linear_model/_huber.pyi index 13de3318..6703f28e 100644 --- a/stubs/sklearn/linear_model/_huber.pyi +++ b/stubs/sklearn/linear_model/_huber.pyi @@ -16,7 +16,6 @@ HuberRegressor_Self = TypeVar("HuberRegressor_Self", bound="HuberRegressor") # Authors: Manoj Kumar mks542@nyu.edu # License: BSD 3 clause -import numpy as np class HuberRegressor(LinearModel, RegressorMixin, BaseEstimator): outliers_: ndarray = ... diff --git a/stubs/sklearn/linear_model/_least_angle.pyi b/stubs/sklearn/linear_model/_least_angle.pyi index 1fb6835b..9e562887 100644 --- a/stubs/sklearn/linear_model/_least_angle.pyi +++ b/stubs/sklearn/linear_model/_least_angle.pyi @@ -21,10 +21,7 @@ LassoLarsIC_Self = TypeVar("LassoLarsIC_Self", bound="LassoLarsIC") Lars_Self = TypeVar("Lars_Self", bound="Lars") LarsCV_Self = TypeVar("LarsCV_Self", bound="LarsCV") -import sys -import warnings -import numpy as np SOLVE_TRIANGULAR_ARGS: dict = ... diff --git a/stubs/sklearn/linear_model/_linear_loss.pyi b/stubs/sklearn/linear_model/_linear_loss.pyi index 80206334..69b6bb7d 100644 --- a/stubs/sklearn/linear_model/_linear_loss.pyi +++ b/stubs/sklearn/linear_model/_linear_loss.pyi @@ -1,6 +1,5 @@ from typing import Callable, Type -import numpy as np from numpy import bool_, ndarray from scipy import sparse as sparse diff --git a/stubs/sklearn/linear_model/_logistic.pyi b/stubs/sklearn/linear_model/_logistic.pyi index e3b670cb..40a832c0 100644 --- a/stubs/sklearn/linear_model/_logistic.pyi +++ b/stubs/sklearn/linear_model/_logistic.pyi @@ -39,10 +39,7 @@ LogisticRegression_Self = TypeVar("LogisticRegression_Self", bound="LogisticRegr # Simon Wu # Arthur Mensch # License: BSD 3 clause (C) 2011 -import warnings -import numpy as np class Isomap(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstimator): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/manifold/_locally_linear.pyi b/stubs/sklearn/manifold/_locally_linear.pyi index 2c6c1540..445a1813 100644 --- a/stubs/sklearn/manifold/_locally_linear.pyi +++ b/stubs/sklearn/manifold/_locally_linear.pyi @@ -18,7 +18,6 @@ from ..utils.validation import FLOAT_DTYPES as FLOAT_DTYPES, check_is_fitted as LocallyLinearEmbedding_Self = TypeVar("LocallyLinearEmbedding_Self", bound="LocallyLinearEmbedding") -import numpy as np def barycenter_weights(X: MatrixLike, Y: MatrixLike, indices: MatrixLike, reg: Float = 1e-3) -> ndarray: ... def barycenter_kneighbors_graph( diff --git a/stubs/sklearn/manifold/_mds.pyi b/stubs/sklearn/manifold/_mds.pyi index 6e02aa77..501316cd 100644 --- a/stubs/sklearn/manifold/_mds.pyi +++ b/stubs/sklearn/manifold/_mds.pyi @@ -15,9 +15,7 @@ from ..utils.parallel import Parallel as Parallel, delayed as delayed MDS_Self = TypeVar("MDS_Self", bound="MDS") -import warnings -import numpy as np def smacof( dissimilarities: MatrixLike, diff --git a/stubs/sklearn/manifold/_spectral_embedding.pyi b/stubs/sklearn/manifold/_spectral_embedding.pyi index 7ae13663..adb54036 100644 --- a/stubs/sklearn/manifold/_spectral_embedding.pyi +++ b/stubs/sklearn/manifold/_spectral_embedding.pyi @@ -6,7 +6,7 @@ from numpy.random import RandomState from scipy import sparse as sparse from scipy.linalg import eigh as eigh from scipy.sparse._coo import coo_matrix -from scipy.sparse.csgraph import connected_components as connected_components, laplacian as csgraph_laplacian +from scipy.sparse.csgraph import connected_components as connected_components from scipy.sparse.linalg import eigsh as eigsh from .._typing import ArrayLike, Float, Int, MatrixLike @@ -19,9 +19,7 @@ from ..utils.fixes import lobpcg SpectralEmbedding_Self = TypeVar("SpectralEmbedding_Self", bound="SpectralEmbedding") -import warnings -import numpy as np def spectral_embedding( adjacency: coo_matrix | MatrixLike, diff --git a/stubs/sklearn/manifold/_t_sne.pyi b/stubs/sklearn/manifold/_t_sne.pyi index ee537859..9f31cd13 100644 --- a/stubs/sklearn/manifold/_t_sne.pyi +++ b/stubs/sklearn/manifold/_t_sne.pyi @@ -1,9 +1,7 @@ -import warnings from numbers import Integral as Integral, Real as Real from time import time as time from typing import Callable, ClassVar, Literal -import numpy as np from numpy import ndarray from numpy.random import RandomState from scipy import linalg as linalg diff --git a/stubs/sklearn/manifold/setup.pyi b/stubs/sklearn/manifold/setup.pyi index 30795b9f..62052209 100644 --- a/stubs/sklearn/manifold/setup.pyi +++ b/stubs/sklearn/manifold/setup.pyi @@ -1,7 +1,3 @@ -import os -import numpy -from numpy.distutils.core import setup -from numpy.distutils.misc_util import Configuration def configuration(parent_package: str = "", top_path=None): ... diff --git a/stubs/sklearn/metrics/_base.pyi b/stubs/sklearn/metrics/_base.pyi index 19d53ec9..efa3c646 100644 --- a/stubs/sklearn/metrics/_base.pyi +++ b/stubs/sklearn/metrics/_base.pyi @@ -1,6 +1,4 @@ from itertools import combinations as combinations -import numpy as np - from ..utils import check_array as check_array, check_consistent_length as check_consistent_length from ..utils.multiclass import type_of_target as type_of_target diff --git a/stubs/sklearn/metrics/_classification.pyi b/stubs/sklearn/metrics/_classification.pyi index 94b95746..b31c5c98 100644 --- a/stubs/sklearn/metrics/_classification.pyi +++ b/stubs/sklearn/metrics/_classification.pyi @@ -1,7 +1,5 @@ -import warnings from typing import Literal -import numpy as np from numpy import ndarray from scipy.sparse import coo_matrix as coo_matrix, csr_matrix as csr_matrix from scipy.special import xlogy as xlogy diff --git a/stubs/sklearn/metrics/_plot/confusion_matrix.pyi b/stubs/sklearn/metrics/_plot/confusion_matrix.pyi index e275f4b8..a46f9d91 100644 --- a/stubs/sklearn/metrics/_plot/confusion_matrix.pyi +++ b/stubs/sklearn/metrics/_plot/confusion_matrix.pyi @@ -1,7 +1,6 @@ from itertools import product as product from typing import Literal -import numpy as np from matplotlib.axes import Axes from matplotlib.colors import Colormap from matplotlib.figure import Figure @@ -12,7 +11,6 @@ from ..._typing import ArrayLike, MatrixLike from ...base import BaseEstimator, is_classifier as is_classifier from ...utils import check_matplotlib_support as check_matplotlib_support from ...utils.multiclass import unique_labels as unique_labels -from .. import confusion_matrix class ConfusionMatrixDisplay: figure_: Figure = ... diff --git a/stubs/sklearn/metrics/_plot/det_curve.pyi b/stubs/sklearn/metrics/_plot/det_curve.pyi index 96aec1b1..76092c34 100644 --- a/stubs/sklearn/metrics/_plot/det_curve.pyi +++ b/stubs/sklearn/metrics/_plot/det_curve.pyi @@ -1,6 +1,5 @@ from typing import Literal -import scipy as sp from matplotlib.artist import Artist from matplotlib.axes import Axes from matplotlib.figure import Figure diff --git a/stubs/sklearn/metrics/_plot/regression.pyi b/stubs/sklearn/metrics/_plot/regression.pyi index 0909d342..f5d9bb90 100644 --- a/stubs/sklearn/metrics/_plot/regression.pyi +++ b/stubs/sklearn/metrics/_plot/regression.pyi @@ -1,7 +1,5 @@ -import numbers from typing import Literal -import numpy as np from matplotlib.artist import Artist from matplotlib.axes import Axes from matplotlib.figure import Figure diff --git a/stubs/sklearn/metrics/_ranking.pyi b/stubs/sklearn/metrics/_ranking.pyi index eed132e3..aefe8995 100644 --- a/stubs/sklearn/metrics/_ranking.pyi +++ b/stubs/sklearn/metrics/_ranking.pyi @@ -1,8 +1,6 @@ -import warnings from functools import partial as partial from typing import Literal -import numpy as np from numpy import ndarray from scipy.sparse import csr_matrix as csr_matrix, issparse as issparse from scipy.stats import rankdata as rankdata diff --git a/stubs/sklearn/metrics/_scorer.pyi b/stubs/sklearn/metrics/_scorer.pyi index b1de461c..9f3bd1d4 100644 --- a/stubs/sklearn/metrics/_scorer.pyi +++ b/stubs/sklearn/metrics/_scorer.pyi @@ -1,12 +1,9 @@ -import copy -import warnings from collections import Counter as Counter from collections.abc import Iterable as Iterable from functools import partial as partial from traceback import format_exc as format_exc from typing import Any, Callable -import numpy as np from numpy import ndarray from .._typing import ArrayLike, Float, MatrixLike diff --git a/stubs/sklearn/metrics/cluster/_bicluster.pyi b/stubs/sklearn/metrics/cluster/_bicluster.pyi index b9acc68f..b211041a 100644 --- a/stubs/sklearn/metrics/cluster/_bicluster.pyi +++ b/stubs/sklearn/metrics/cluster/_bicluster.pyi @@ -1,6 +1,5 @@ from typing import Callable, Literal -import numpy as np from numpy import ndarray from scipy.optimize import linear_sum_assignment as linear_sum_assignment diff --git a/stubs/sklearn/metrics/cluster/_supervised.pyi b/stubs/sklearn/metrics/cluster/_supervised.pyi index 05d55d77..648a02d3 100644 --- a/stubs/sklearn/metrics/cluster/_supervised.pyi +++ b/stubs/sklearn/metrics/cluster/_supervised.pyi @@ -1,9 +1,6 @@ -import warnings from math import log as log -import numpy as np from numpy import ndarray -from scipy import sparse as sp from scipy.sparse import spmatrix from ..._typing import ArrayLike, Float, MatrixLike diff --git a/stubs/sklearn/metrics/cluster/_unsupervised.pyi b/stubs/sklearn/metrics/cluster/_unsupervised.pyi index 6640eb66..8d526310 100644 --- a/stubs/sklearn/metrics/cluster/_unsupervised.pyi +++ b/stubs/sklearn/metrics/cluster/_unsupervised.pyi @@ -1,7 +1,5 @@ -import functools from typing import Callable -import numpy as np from numpy.random import RandomState from ..._typing import ArrayLike, Float, Int, MatrixLike diff --git a/stubs/sklearn/metrics/cluster/setup.pyi b/stubs/sklearn/metrics/cluster/setup.pyi index 30795b9f..62052209 100644 --- a/stubs/sklearn/metrics/cluster/setup.pyi +++ b/stubs/sklearn/metrics/cluster/setup.pyi @@ -1,7 +1,3 @@ -import os -import numpy -from numpy.distutils.core import setup -from numpy.distutils.misc_util import Configuration def configuration(parent_package: str = "", top_path=None): ... diff --git a/stubs/sklearn/metrics/pairwise.pyi b/stubs/sklearn/metrics/pairwise.pyi index 99edc164..d721b679 100644 --- a/stubs/sklearn/metrics/pairwise.pyi +++ b/stubs/sklearn/metrics/pairwise.pyi @@ -1,18 +1,14 @@ -import itertools -import warnings from functools import partial as partial from typing import Callable, Iterator, Sequence -import numpy as np from joblib import effective_n_jobs as effective_n_jobs from numpy import ndarray from scipy.sparse import csr_matrix as csr_matrix, issparse as issparse -from scipy.spatial import distance from .. import config_context as config_context from .._typing import ArrayLike, Float, Int, MatrixLike from ..exceptions import DataConversionWarning as DataConversionWarning -from ..gaussian_process.kernels import ExpSineSquared, Kernel as GPKernel +from ..gaussian_process.kernels import ExpSineSquared from ..metrics import DistanceMetric as DistanceMetric from ..preprocessing import normalize as normalize from ..utils import ( diff --git a/stubs/sklearn/metrics/setup.pyi b/stubs/sklearn/metrics/setup.pyi index e0d3e53f..62052209 100644 --- a/stubs/sklearn/metrics/setup.pyi +++ b/stubs/sklearn/metrics/setup.pyi @@ -1,7 +1,3 @@ -import os -import numpy as np -from numpy.distutils.core import setup -from numpy.distutils.misc_util import Configuration def configuration(parent_package: str = "", top_path=None): ... diff --git a/stubs/sklearn/mixture/_base.pyi b/stubs/sklearn/mixture/_base.pyi index 94ff30c1..63ee5465 100644 --- a/stubs/sklearn/mixture/_base.pyi +++ b/stubs/sklearn/mixture/_base.pyi @@ -22,9 +22,7 @@ BaseMixture_Self = TypeVar("BaseMixture_Self", bound="BaseMixture") # Modified by Thierry Guillemot # License: BSD 3 clause -import warnings -import numpy as np class BaseMixture(DensityMixin, BaseEstimator, metaclass=ABCMeta): _parameter_constraints: ClassVar[dict] = ... diff --git a/stubs/sklearn/mixture/_bayesian_mixture.pyi b/stubs/sklearn/mixture/_bayesian_mixture.pyi index a38d3cd4..53df74bf 100644 --- a/stubs/sklearn/mixture/_bayesian_mixture.pyi +++ b/stubs/sklearn/mixture/_bayesian_mixture.pyi @@ -1,8 +1,6 @@ -import math from numbers import Real as Real from typing import ClassVar, Literal -import numpy as np from numpy import ndarray from numpy.random import RandomState from scipy.special import betaln as betaln, digamma as digamma, gammaln as gammaln diff --git a/stubs/sklearn/mixture/_gaussian_mixture.pyi b/stubs/sklearn/mixture/_gaussian_mixture.pyi index 526b8bb4..b0eb848f 100644 --- a/stubs/sklearn/mixture/_gaussian_mixture.pyi +++ b/stubs/sklearn/mixture/_gaussian_mixture.pyi @@ -1,6 +1,5 @@ from typing import ClassVar, Literal -import numpy as np from numpy import ndarray from numpy.random import RandomState from scipy import linalg as linalg diff --git a/stubs/sklearn/model_selection/_plot.pyi b/stubs/sklearn/model_selection/_plot.pyi index 290803d7..9dfa7c68 100644 --- a/stubs/sklearn/model_selection/_plot.pyi +++ b/stubs/sklearn/model_selection/_plot.pyi @@ -1,6 +1,5 @@ from typing import Callable, Iterable, Literal -import numpy as np from matplotlib.artist import Artist from matplotlib.axes import Axes from matplotlib.figure import Figure diff --git a/stubs/sklearn/model_selection/_search.pyi b/stubs/sklearn/model_selection/_search.pyi index 10a4efa7..14972d78 100644 --- a/stubs/sklearn/model_selection/_search.pyi +++ b/stubs/sklearn/model_selection/_search.pyi @@ -26,12 +26,7 @@ from ._split import BaseShuffleSplit, check_cv as check_cv BaseSearchCV_Self = TypeVar("BaseSearchCV_Self", bound="BaseSearchCV") BaseEstimatorT = TypeVar("BaseEstimatorT", bound=BaseEstimator, default=BaseEstimator, covariant=True) -import numbers -import operator -import time -import warnings -import numpy as np __all__ = ["GridSearchCV", "ParameterGrid", "ParameterSampler", "RandomizedSearchCV"] diff --git a/stubs/sklearn/model_selection/_search_successive_halving.pyi b/stubs/sklearn/model_selection/_search_successive_halving.pyi index b41cb5db..e9fc0f3e 100644 --- a/stubs/sklearn/model_selection/_search_successive_halving.pyi +++ b/stubs/sklearn/model_selection/_search_successive_halving.pyi @@ -18,7 +18,6 @@ from ._split import BaseShuffleSplit, check_cv as check_cv BaseSuccessiveHalving_Self = TypeVar("BaseSuccessiveHalving_Self", bound="BaseSuccessiveHalving") -import numpy as np __all__ = ["HalvingGridSearchCV", "HalvingRandomSearchCV"] diff --git a/stubs/sklearn/model_selection/_split.pyi b/stubs/sklearn/model_selection/_split.pyi index 885d8fa8..693b99eb 100644 --- a/stubs/sklearn/model_selection/_split.pyi +++ b/stubs/sklearn/model_selection/_split.pyi @@ -1,5 +1,3 @@ -import numbers -import warnings from abc import ABCMeta, abstractmethod from collections import defaultdict as defaultdict from collections.abc import Iterable @@ -8,7 +6,6 @@ from itertools import chain as chain, combinations as combinations from math import ceil as ceil, floor as floor from typing import Any, Callable, Iterable, Iterator -import numpy as np from numpy import ndarray from numpy.random import RandomState from scipy.special import comb as comb diff --git a/stubs/sklearn/model_selection/_validation.pyi b/stubs/sklearn/model_selection/_validation.pyi index 99301f62..2c7cca03 100644 --- a/stubs/sklearn/model_selection/_validation.pyi +++ b/stubs/sklearn/model_selection/_validation.pyi @@ -1,14 +1,9 @@ -import numbers -import time -import warnings from collections import Counter as Counter from contextlib import suppress as suppress from functools import partial as partial from traceback import format_exc as format_exc from typing import Callable, Iterable, Literal, Mapping -import numpy as np -import scipy.sparse as sp from joblib import logger as logger from numpy import ndarray from numpy.random import RandomState diff --git a/stubs/sklearn/multiclass.pyi b/stubs/sklearn/multiclass.pyi index 155d53af..0a96cb9c 100644 --- a/stubs/sklearn/multiclass.pyi +++ b/stubs/sklearn/multiclass.pyi @@ -32,12 +32,7 @@ OutputCodeClassifier_Self = TypeVar("OutputCodeClassifier_Self", bound="OutputCo # # License: BSD 3 clause -import array -import itertools -import warnings -import numpy as np -import scipy.sparse as sp __all__ = [ "OneVsRestClassifier", diff --git a/stubs/sklearn/multioutput.pyi b/stubs/sklearn/multioutput.pyi index 8283301d..961340e0 100644 --- a/stubs/sklearn/multioutput.pyi +++ b/stubs/sklearn/multioutput.pyi @@ -31,8 +31,6 @@ _MultiOutputEstimator_Self = TypeVar("_MultiOutputEstimator_Self", bound="_Multi MultiOutputRegressor_Self = TypeVar("MultiOutputRegressor_Self", bound="MultiOutputRegressor") ClassifierChain_Self = TypeVar("ClassifierChain_Self", bound="ClassifierChain") -import numpy as np -import scipy.sparse as sp __all__ = [ "MultiOutputRegressor", diff --git a/stubs/sklearn/naive_bayes.pyi b/stubs/sklearn/naive_bayes.pyi index 5cd5b7f7..74bf23e2 100644 --- a/stubs/sklearn/naive_bayes.pyi +++ b/stubs/sklearn/naive_bayes.pyi @@ -7,7 +7,7 @@ from scipy.special import logsumexp as logsumexp from ._typing import ArrayLike, Float, Int, MatrixLike from .base import BaseEstimator, ClassifierMixin -from .preprocessing import LabelBinarizer as LabelBinarizer, binarize, label_binarize as label_binarize +from .preprocessing import LabelBinarizer as LabelBinarizer, label_binarize as label_binarize from .utils._param_validation import Hidden as Hidden, Interval as Interval, StrOptions as StrOptions from .utils.extmath import safe_sparse_dot as safe_sparse_dot from .utils.validation import check_is_fitted as check_is_fitted, check_non_negative as check_non_negative @@ -25,9 +25,7 @@ CategoricalNB_Self = TypeVar("CategoricalNB_Self", bound="CategoricalNB") # (parts based on earlier work by Mathieu Blondel) # # License: BSD 3 clause -import warnings -import numpy as np __all__ = [ "BernoulliNB", diff --git a/stubs/sklearn/neighbors/_ball_tree.pyi b/stubs/sklearn/neighbors/_ball_tree.pyi index c54b2384..97d0a357 100644 --- a/stubs/sklearn/neighbors/_ball_tree.pyi +++ b/stubs/sklearn/neighbors/_ball_tree.pyi @@ -1,4 +1,3 @@ -from numpy import float32 as DTYPE from ._binary_tree import BinaryTree diff --git a/stubs/sklearn/neighbors/_base.pyi b/stubs/sklearn/neighbors/_base.pyi index 998c10cc..6224f98c 100644 --- a/stubs/sklearn/neighbors/_base.pyi +++ b/stubs/sklearn/neighbors/_base.pyi @@ -5,15 +5,11 @@ # Multi-output support by Arnaud Joly # # License: BSD 3 clause (C) INRIA, University of Amsterdam -import itertools -import numbers -import warnings from abc import ABCMeta, abstractmethod from functools import partial as partial from numbers import Integral as Integral, Real as Real from typing import ClassVar, Literal -import numpy as np from joblib import effective_n_jobs as effective_n_jobs from numpy import ndarray from scipy.sparse import csr_matrix as csr_matrix, issparse as issparse, spmatrix diff --git a/stubs/sklearn/neighbors/_classification.pyi b/stubs/sklearn/neighbors/_classification.pyi index c779aaf6..b396bd60 100644 --- a/stubs/sklearn/neighbors/_classification.pyi +++ b/stubs/sklearn/neighbors/_classification.pyi @@ -12,9 +12,7 @@ from ._base import KNeighborsMixin, NeighborsBase, RadiusNeighborsMixin RadiusNeighborsClassifier_Self = TypeVar("RadiusNeighborsClassifier_Self", bound="RadiusNeighborsClassifier") KNeighborsClassifier_Self = TypeVar("KNeighborsClassifier_Self", bound="KNeighborsClassifier") -import warnings -import numpy as np class KNeighborsClassifier(KNeighborsMixin, ClassifierMixin, NeighborsBase): outputs_2d_: bool = ... diff --git a/stubs/sklearn/neighbors/_distance_metric.pyi b/stubs/sklearn/neighbors/_distance_metric.pyi index 24cb3074..de510092 100644 --- a/stubs/sklearn/neighbors/_distance_metric.pyi +++ b/stubs/sklearn/neighbors/_distance_metric.pyi @@ -1,5 +1,4 @@ # TODO: Remove this file in 1.3 -import warnings from ..metrics import DistanceMetric as _DistanceMetric diff --git a/stubs/sklearn/neighbors/_kde.pyi b/stubs/sklearn/neighbors/_kde.pyi index 54b27b03..f40c38d8 100644 --- a/stubs/sklearn/neighbors/_kde.pyi +++ b/stubs/sklearn/neighbors/_kde.pyi @@ -19,9 +19,7 @@ from ._kd_tree import KDTree as KDTree KernelDensity_Self = TypeVar("KernelDensity_Self", bound="KernelDensity") # Author: Jake Vanderplas -import itertools -import numpy as np VALID_KERNELS: list = ... diff --git a/stubs/sklearn/neighbors/_lof.pyi b/stubs/sklearn/neighbors/_lof.pyi index e53d59f3..107d9bcd 100644 --- a/stubs/sklearn/neighbors/_lof.pyi +++ b/stubs/sklearn/neighbors/_lof.pyi @@ -17,9 +17,7 @@ LocalOutlierFactor_Self = TypeVar("LocalOutlierFactor_Self", bound="LocalOutlier # Alexandre Gramfort # License: BSD 3 clause -import warnings -import numpy as np __all__ = ["LocalOutlierFactor"] diff --git a/stubs/sklearn/neighbors/_nca.pyi b/stubs/sklearn/neighbors/_nca.pyi index e9f67814..ef72e814 100644 --- a/stubs/sklearn/neighbors/_nca.pyi +++ b/stubs/sklearn/neighbors/_nca.pyi @@ -20,10 +20,7 @@ from ..utils.validation import check_array as check_array, check_is_fitted as ch NeighborhoodComponentsAnalysis_Self = TypeVar("NeighborhoodComponentsAnalysis_Self", bound="NeighborhoodComponentsAnalysis") -import sys -import time -import numpy as np class NeighborhoodComponentsAnalysis(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstimator): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/neighbors/_nearest_centroid.pyi b/stubs/sklearn/neighbors/_nearest_centroid.pyi index d8085f5c..e24bf180 100644 --- a/stubs/sklearn/neighbors/_nearest_centroid.pyi +++ b/stubs/sklearn/neighbors/_nearest_centroid.pyi @@ -2,7 +2,6 @@ from numbers import Real as Real from typing import Callable, ClassVar, TypeVar from numpy import ndarray -from scipy import sparse as sp from .._typing import ArrayLike, Float, MatrixLike from ..base import BaseEstimator, ClassifierMixin @@ -20,9 +19,7 @@ NearestCentroid_Self = TypeVar("NearestCentroid_Self", bound="NearestCentroid") # # License: BSD 3 clause -import warnings -import numpy as np class NearestCentroid(ClassifierMixin, BaseEstimator): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/neighbors/_regression.pyi b/stubs/sklearn/neighbors/_regression.pyi index 3dd1869b..bc6e94c7 100644 --- a/stubs/sklearn/neighbors/_regression.pyi +++ b/stubs/sklearn/neighbors/_regression.pyi @@ -20,9 +20,7 @@ RadiusNeighborsRegressor_Self = TypeVar("RadiusNeighborsRegressor_Self", bound=" # License: BSD 3 clause (C) INRIA, University of Amsterdam, # University of Copenhagen -import warnings -import numpy as np class KNeighborsRegressor(KNeighborsMixin, RegressorMixin, NeighborsBase): n_samples_fit_: int = ... diff --git a/stubs/sklearn/neighbors/setup.pyi b/stubs/sklearn/neighbors/setup.pyi index ba0b204e..62052209 100644 --- a/stubs/sklearn/neighbors/setup.pyi +++ b/stubs/sklearn/neighbors/setup.pyi @@ -1,5 +1,3 @@ -import os -from numpy.distutils.misc_util import Configuration def configuration(parent_package: str = "", top_path=None): ... diff --git a/stubs/sklearn/neural_network/_base.pyi b/stubs/sklearn/neural_network/_base.pyi index 4f4eb827..aa182c00 100644 --- a/stubs/sklearn/neural_network/_base.pyi +++ b/stubs/sklearn/neural_network/_base.pyi @@ -1,5 +1,4 @@ -import numpy as np -from scipy.special import expit as logistic_sigmoid, xlogy as xlogy +from scipy.special import xlogy as xlogy from .._typing import ArrayLike, Float, MatrixLike diff --git a/stubs/sklearn/neural_network/_multilayer_perceptron.pyi b/stubs/sklearn/neural_network/_multilayer_perceptron.pyi index 8fefc550..d1ee8275 100644 --- a/stubs/sklearn/neural_network/_multilayer_perceptron.pyi +++ b/stubs/sklearn/neural_network/_multilayer_perceptron.pyi @@ -12,7 +12,7 @@ from ..exceptions import ConvergenceWarning as ConvergenceWarning from ..metrics import accuracy_score as accuracy_score, r2_score as r2_score from ..model_selection import train_test_split as train_test_split from ..preprocessing import LabelBinarizer as LabelBinarizer -from ..utils import check_random_state as check_random_state, column_or_1d as column_or_1d, gen_batches as gen_batches, shuffle +from ..utils import check_random_state as check_random_state, column_or_1d as column_or_1d, gen_batches as gen_batches from ..utils._param_validation import Interval as Interval, Options as Options, StrOptions as StrOptions from ..utils.extmath import safe_sparse_dot as safe_sparse_dot from ..utils.metaestimators import available_if as available_if @@ -25,10 +25,7 @@ BaseMultilayerPerceptron_Self = TypeVar("BaseMultilayerPerceptron_Self", bound=" MLPRegressor_Self = TypeVar("MLPRegressor_Self", bound="MLPRegressor") MLPClassifier_Self = TypeVar("MLPClassifier_Self", bound="MLPClassifier") -import warnings -import numpy as np -import scipy.optimize _STOCHASTIC_SOLVERS: list = ... diff --git a/stubs/sklearn/neural_network/_rbm.pyi b/stubs/sklearn/neural_network/_rbm.pyi index dac7bf1e..fe002f80 100644 --- a/stubs/sklearn/neural_network/_rbm.pyi +++ b/stubs/sklearn/neural_network/_rbm.pyi @@ -20,10 +20,7 @@ BernoulliRBM_Self = TypeVar("BernoulliRBM_Self", bound="BernoulliRBM") # Lars Buitinck # License: BSD 3 clause -import time -import numpy as np -import scipy.sparse as sp class BernoulliRBM(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstimator): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/neural_network/_stochastic_optimizers.pyi b/stubs/sklearn/neural_network/_stochastic_optimizers.pyi index fe07ec60..525990a3 100644 --- a/stubs/sklearn/neural_network/_stochastic_optimizers.pyi +++ b/stubs/sklearn/neural_network/_stochastic_optimizers.pyi @@ -1,6 +1,5 @@ from typing import Literal, Sequence -import numpy as np from numpy import ndarray from .._typing import Float, Int diff --git a/stubs/sklearn/pipeline.pyi b/stubs/sklearn/pipeline.pyi index 7aeec794..0c0fe5c0 100644 --- a/stubs/sklearn/pipeline.pyi +++ b/stubs/sklearn/pipeline.pyi @@ -22,7 +22,6 @@ from .utils.validation import check_is_fitted as check_is_fitted, check_memory a FeatureUnion_Self = TypeVar("FeatureUnion_Self", bound="FeatureUnion") Pipeline_Self = TypeVar("Pipeline_Self", bound="Pipeline") -import numpy as np __all__ = ["Pipeline", "FeatureUnion", "make_pipeline", "make_union"] diff --git a/stubs/sklearn/preprocessing/_data.pyi b/stubs/sklearn/preprocessing/_data.pyi index 48b688b4..30392b1e 100644 --- a/stubs/sklearn/preprocessing/_data.pyi +++ b/stubs/sklearn/preprocessing/_data.pyi @@ -50,9 +50,7 @@ PowerTransformer_Self = TypeVar("PowerTransformer_Self", bound="PowerTransformer # Eric Chang # License: BSD 3 clause -import warnings -import numpy as np BOUNDS_THRESHOLD: float = ... diff --git a/stubs/sklearn/preprocessing/_discretization.pyi b/stubs/sklearn/preprocessing/_discretization.pyi index b764636f..aadedb8f 100644 --- a/stubs/sklearn/preprocessing/_discretization.pyi +++ b/stubs/sklearn/preprocessing/_discretization.pyi @@ -24,9 +24,7 @@ KBinsDiscretizer_Self = TypeVar("KBinsDiscretizer_Self", bound="KBinsDiscretizer # License: BSD -import warnings -import numpy as np class KBinsDiscretizer(TransformerMixin, BaseEstimator): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/preprocessing/_encoders.pyi b/stubs/sklearn/preprocessing/_encoders.pyi index c9312d38..212bf43b 100644 --- a/stubs/sklearn/preprocessing/_encoders.pyi +++ b/stubs/sklearn/preprocessing/_encoders.pyi @@ -3,7 +3,6 @@ from typing import ClassVar, Literal, Sequence, TypeVar from numpy import ndarray from pandas.core.series import Series -from scipy import sparse from scipy.sparse import spmatrix from .._typing import ArrayLike, Int, MatrixLike @@ -19,10 +18,7 @@ OneHotEncoder_Self = TypeVar("OneHotEncoder_Self", bound="OneHotEncoder") # Joris Van den Bossche # License: BSD 3 clause -import numbers -import warnings -import numpy as np __all__ = ["OneHotEncoder", "OrdinalEncoder"] diff --git a/stubs/sklearn/preprocessing/_function_transformer.pyi b/stubs/sklearn/preprocessing/_function_transformer.pyi index 8b0e6a24..b60a53ed 100644 --- a/stubs/sklearn/preprocessing/_function_transformer.pyi +++ b/stubs/sklearn/preprocessing/_function_transformer.pyi @@ -11,9 +11,7 @@ from ..utils.validation import check_array as check_array FunctionTransformer_Self = TypeVar("FunctionTransformer_Self", bound="FunctionTransformer") -import warnings -import numpy as np class FunctionTransformer(TransformerMixin, BaseEstimator): feature_names_in_: ndarray = ... diff --git a/stubs/sklearn/preprocessing/_label.pyi b/stubs/sklearn/preprocessing/_label.pyi index ecb125d4..38d8bf6c 100644 --- a/stubs/sklearn/preprocessing/_label.pyi +++ b/stubs/sklearn/preprocessing/_label.pyi @@ -25,12 +25,7 @@ LabelBinarizer_Self = TypeVar("LabelBinarizer_Self", bound="LabelBinarizer") # Hamzeh Alsalhi # License: BSD 3 clause -import array -import itertools -import warnings -import numpy as np -import scipy.sparse as sp __all__ = [ "label_binarize", diff --git a/stubs/sklearn/preprocessing/_polynomial.pyi b/stubs/sklearn/preprocessing/_polynomial.pyi index 40fee5c5..13c98dfa 100644 --- a/stubs/sklearn/preprocessing/_polynomial.pyi +++ b/stubs/sklearn/preprocessing/_polynomial.pyi @@ -1,10 +1,9 @@ -from itertools import chain as chain, combinations as combinations, combinations_with_replacement as combinations_w_r +from itertools import chain as chain, combinations as combinations from numbers import Integral as Integral from typing import Any, ClassVar, Literal, TypeVar from numpy import ndarray from pandas.core.series import Series -from scipy import sparse from scipy.interpolate import BSpline as BSpline from scipy.sparse import spmatrix from scipy.special import comb as comb @@ -18,9 +17,7 @@ from ..utils.validation import FLOAT_DTYPES as FLOAT_DTYPES, check_is_fitted as SplineTransformer_Self = TypeVar("SplineTransformer_Self", bound="SplineTransformer") PolynomialFeatures_Self = TypeVar("PolynomialFeatures_Self", bound="PolynomialFeatures") -import collections -import numpy as np __all__ = [ "PolynomialFeatures", diff --git a/stubs/sklearn/preprocessing/setup.pyi b/stubs/sklearn/preprocessing/setup.pyi index ba0b204e..62052209 100644 --- a/stubs/sklearn/preprocessing/setup.pyi +++ b/stubs/sklearn/preprocessing/setup.pyi @@ -1,5 +1,3 @@ -import os -from numpy.distutils.misc_util import Configuration def configuration(parent_package: str = "", top_path=None): ... diff --git a/stubs/sklearn/random_projection.pyi b/stubs/sklearn/random_projection.pyi index bc59c8bb..67c7bf93 100644 --- a/stubs/sklearn/random_projection.pyi +++ b/stubs/sklearn/random_projection.pyi @@ -22,10 +22,7 @@ BaseRandomProjection_Self = TypeVar("BaseRandomProjection_Self", bound="BaseRand # Arnaud Joly # License: BSD 3 clause -import warnings -import numpy as np -import scipy.sparse as sp __all__ = [ "SparseRandomProjection", diff --git a/stubs/sklearn/semi_supervised/_label_propagation.pyi b/stubs/sklearn/semi_supervised/_label_propagation.pyi index 542b78ae..f97bf5e9 100644 --- a/stubs/sklearn/semi_supervised/_label_propagation.pyi +++ b/stubs/sklearn/semi_supervised/_label_propagation.pyi @@ -21,9 +21,7 @@ LabelPropagation_Self = TypeVar("LabelPropagation_Self", bound="LabelPropagation # coding=utf8 -import warnings -import numpy as np class BaseLabelPropagation(ClassifierMixin, BaseEstimator, metaclass=ABCMeta): _parameter_constraints: ClassVar[dict] = ... diff --git a/stubs/sklearn/semi_supervised/_self_training.pyi b/stubs/sklearn/semi_supervised/_self_training.pyi index df135f1d..64f0a5cc 100644 --- a/stubs/sklearn/semi_supervised/_self_training.pyi +++ b/stubs/sklearn/semi_supervised/_self_training.pyi @@ -12,9 +12,7 @@ from ..utils.validation import check_is_fitted as check_is_fitted SelfTrainingClassifier_Self = TypeVar("SelfTrainingClassifier_Self", bound="SelfTrainingClassifier") -import warnings -import numpy as np __all__ = ["SelfTrainingClassifier"] diff --git a/stubs/sklearn/setup.pyi b/stubs/sklearn/setup.pyi index 140bf54d..b3ddf582 100644 --- a/stubs/sklearn/setup.pyi +++ b/stubs/sklearn/setup.pyi @@ -1,9 +1,4 @@ -import os -import sys -from numpy.distutils.core import setup -from numpy.distutils.misc_util import Configuration -from ._build_utils import cythonize_extensions def configuration(parent_package: str = "", top_path=None): ... diff --git a/stubs/sklearn/svm/_base.pyi b/stubs/sklearn/svm/_base.pyi index 9747cbca..ecc0f72a 100644 --- a/stubs/sklearn/svm/_base.pyi +++ b/stubs/sklearn/svm/_base.pyi @@ -23,10 +23,7 @@ from ..utils.validation import check_consistent_length as check_consistent_lengt BaseLibSVM_Self = TypeVar("BaseLibSVM_Self", bound="BaseLibSVM") -import warnings -import numpy as np -import scipy.sparse as sp LIBSVM_IMPL: list = ... diff --git a/stubs/sklearn/svm/_bounds.pyi b/stubs/sklearn/svm/_bounds.pyi index e7cea061..f7344d00 100644 --- a/stubs/sklearn/svm/_bounds.pyi +++ b/stubs/sklearn/svm/_bounds.pyi @@ -1,8 +1,6 @@ from numbers import Real as Real from typing import Literal -import numpy as np - from .._typing import ArrayLike, Float, MatrixLike from ..preprocessing import LabelBinarizer as LabelBinarizer from ..utils._param_validation import Interval as Interval, StrOptions as StrOptions, validate_params as validate_params diff --git a/stubs/sklearn/svm/_classes.pyi b/stubs/sklearn/svm/_classes.pyi index b9394c51..a322d55d 100644 --- a/stubs/sklearn/svm/_classes.pyi +++ b/stubs/sklearn/svm/_classes.pyi @@ -16,7 +16,6 @@ OneClassSVM_Self = TypeVar("OneClassSVM_Self", bound="OneClassSVM") LinearSVC_Self = TypeVar("LinearSVC_Self", bound="LinearSVC") LinearSVR_Self = TypeVar("LinearSVR_Self", bound="LinearSVR") -import numpy as np class LinearSVC(LinearClassifierMixin, SparseCoefMixin, BaseEstimator): n_iter_: int = ... diff --git a/stubs/sklearn/svm/setup.pyi b/stubs/sklearn/svm/setup.pyi index e77d7e96..62052209 100644 --- a/stubs/sklearn/svm/setup.pyi +++ b/stubs/sklearn/svm/setup.pyi @@ -1,8 +1,3 @@ -import os -from os.path import join -import numpy -from numpy.distutils.core import setup -from numpy.distutils.misc_util import Configuration def configuration(parent_package: str = "", top_path=None): ... diff --git a/stubs/sklearn/tests/random_seed.pyi b/stubs/sklearn/tests/random_seed.pyi index a1e2e519..cbf5a27f 100644 --- a/stubs/sklearn/tests/random_seed.pyi +++ b/stubs/sklearn/tests/random_seed.pyi @@ -1,4 +1,3 @@ -import pytest # Passes the main worker's random seeds to workers class XDistHooks: diff --git a/stubs/sklearn/tree/_classes.pyi b/stubs/sklearn/tree/_classes.pyi index 52118504..7a0e9a0e 100644 --- a/stubs/sklearn/tree/_classes.pyi +++ b/stubs/sklearn/tree/_classes.pyi @@ -43,11 +43,7 @@ DecisionTreeRegressor_Self = TypeVar("DecisionTreeRegressor_Self", bound="Decisi # # License: BSD 3 clause -import copy -import numbers -import warnings -import numpy as np __all__ = [ "DecisionTreeClassifier", diff --git a/stubs/sklearn/tree/_export.pyi b/stubs/sklearn/tree/_export.pyi index c384c948..e7a1b3e0 100644 --- a/stubs/sklearn/tree/_export.pyi +++ b/stubs/sklearn/tree/_export.pyi @@ -2,7 +2,6 @@ from io import StringIO as StringIO from numbers import Integral as Integral from typing import Any, Literal, Sequence -import numpy as np from matplotlib.axes import Axes from matplotlib.text import Annotation from numpy import longlong, ndarray diff --git a/stubs/sklearn/tree/_reingold_tilford.pyi b/stubs/sklearn/tree/_reingold_tilford.pyi index 976dbcd9..aecbd289 100644 --- a/stubs/sklearn/tree/_reingold_tilford.pyi +++ b/stubs/sklearn/tree/_reingold_tilford.pyi @@ -1,4 +1,3 @@ -import numpy as np from numpy import longlong, ndarray # Authors: William Mill (bill@billmill.org) diff --git a/stubs/sklearn/tree/_tree.pyi b/stubs/sklearn/tree/_tree.pyi index 64d6fc00..8774cd09 100644 --- a/stubs/sklearn/tree/_tree.pyi +++ b/stubs/sklearn/tree/_tree.pyi @@ -1,7 +1,6 @@ from typing import Any import numpy as np -from numpy import float32 as DTYPE, float64 as DOUBLE from ._splitter import Splitter diff --git a/stubs/sklearn/tree/setup.pyi b/stubs/sklearn/tree/setup.pyi index 30795b9f..62052209 100644 --- a/stubs/sklearn/tree/setup.pyi +++ b/stubs/sklearn/tree/setup.pyi @@ -1,7 +1,3 @@ -import os -import numpy -from numpy.distutils.core import setup -from numpy.distutils.misc_util import Configuration def configuration(parent_package: str = "", top_path=None): ... diff --git a/stubs/sklearn/utils/__init__.pyi b/stubs/sklearn/utils/__init__.pyi index a1068c56..a826128a 100644 --- a/stubs/sklearn/utils/__init__.pyi +++ b/stubs/sklearn/utils/__init__.pyi @@ -9,7 +9,6 @@ from contextlib import contextmanager as contextmanager, suppress as suppress from itertools import compress as compress, islice as islice from typing import Any, Iterable, Iterator, Sequence, SupportsIndex -import numpy as np from numpy import ndarray from numpy.random import RandomState from scipy.sparse import issparse as issparse diff --git a/stubs/sklearn/utils/_array_api.pyi b/stubs/sklearn/utils/_array_api.pyi index 73b49790..8522838a 100644 --- a/stubs/sklearn/utils/_array_api.pyi +++ b/stubs/sklearn/utils/_array_api.pyi @@ -1,7 +1,5 @@ from typing import Type -import numpy -import scipy.special as special from numpy import int32, ndarray from .._config import get_config as get_config diff --git a/stubs/sklearn/utils/_encode.pyi b/stubs/sklearn/utils/_encode.pyi index 923b4020..1ed69fb6 100644 --- a/stubs/sklearn/utils/_encode.pyi +++ b/stubs/sklearn/utils/_encode.pyi @@ -2,7 +2,6 @@ from collections import Counter from contextlib import suppress as suppress from typing import Any, ClassVar, NamedTuple -import numpy as np from numpy import ndarray, str_ from . import is_scalar_nan as is_scalar_nan diff --git a/stubs/sklearn/utils/_estimator_html_repr.pyi b/stubs/sklearn/utils/_estimator_html_repr.pyi index 1bde84c7..158b1336 100644 --- a/stubs/sklearn/utils/_estimator_html_repr.pyi +++ b/stubs/sklearn/utils/_estimator_html_repr.pyi @@ -1,4 +1,3 @@ -import html from contextlib import closing as closing from inspect import isclass as isclass from io import StringIO as StringIO diff --git a/stubs/sklearn/utils/_joblib.pyi b/stubs/sklearn/utils/_joblib.pyi index 89d3d807..aba64414 100644 --- a/stubs/sklearn/utils/_joblib.pyi +++ b/stubs/sklearn/utils/_joblib.pyi @@ -1,4 +1,3 @@ -import warnings as _warnings import joblib from joblib import ( diff --git a/stubs/sklearn/utils/_mask.pyi b/stubs/sklearn/utils/_mask.pyi index fa97bfb1..acd74bd5 100644 --- a/stubs/sklearn/utils/_mask.pyi +++ b/stubs/sklearn/utils/_mask.pyi @@ -1,6 +1,3 @@ from contextlib import suppress as suppress -import numpy as np -from scipy import sparse as sp - from . import is_scalar_nan as is_scalar_nan diff --git a/stubs/sklearn/utils/_mocking.pyi b/stubs/sklearn/utils/_mocking.pyi index 5c09140a..f7500d27 100644 --- a/stubs/sklearn/utils/_mocking.pyi +++ b/stubs/sklearn/utils/_mocking.pyi @@ -8,7 +8,6 @@ from .validation import check_array as check_array, check_is_fitted as check_is_ CheckingClassifier_Self = TypeVar("CheckingClassifier_Self", bound="CheckingClassifier") -import numpy as np class ArraySlicingWrapper: def __init__(self, array) -> None: ... diff --git a/stubs/sklearn/utils/_param_validation.pyi b/stubs/sklearn/utils/_param_validation.pyi index 1af70812..9d4afda8 100644 --- a/stubs/sklearn/utils/_param_validation.pyi +++ b/stubs/sklearn/utils/_param_validation.pyi @@ -1,15 +1,9 @@ -import functools -import math -import operator -import re -import warnings from abc import ABC, abstractmethod from collections.abc import Iterable as Iterable from inspect import signature as signature from numbers import Integral, Real from typing import Any, Callable, Literal, Mapping, Sequence, Type -import numpy as np from scipy.sparse import csr_matrix as csr_matrix, issparse as issparse from .._typing import Float diff --git a/stubs/sklearn/utils/_pprint.pyi b/stubs/sklearn/utils/_pprint.pyi index 356b9b96..d8732f66 100644 --- a/stubs/sklearn/utils/_pprint.pyi +++ b/stubs/sklearn/utils/_pprint.pyi @@ -1,7 +1,6 @@ -import inspect import pprint from collections import OrderedDict as OrderedDict -from typing import Any, Type +from typing import Any from .._config import get_config as get_config from ..base import BaseEstimator as BaseEstimator diff --git a/stubs/sklearn/utils/_show_versions.pyi b/stubs/sklearn/utils/_show_versions.pyi index 2b89db6b..7fc62c78 100644 --- a/stubs/sklearn/utils/_show_versions.pyi +++ b/stubs/sklearn/utils/_show_versions.pyi @@ -1,5 +1,3 @@ -import platform -import sys from ..utils.fixes import threadpool_info as threadpool_info diff --git a/stubs/sklearn/utils/_tags.pyi b/stubs/sklearn/utils/_tags.pyi index bae1cf53..ff0a6021 100644 --- a/stubs/sklearn/utils/_tags.pyi +++ b/stubs/sklearn/utils/_tags.pyi @@ -1,3 +1,2 @@ -import numpy as np _DEFAULT_TAGS: dict = ... diff --git a/stubs/sklearn/utils/_testing.pyi b/stubs/sklearn/utils/_testing.pyi index 46f667fb..d7a03a26 100644 --- a/stubs/sklearn/utils/_testing.pyi +++ b/stubs/sklearn/utils/_testing.pyi @@ -1,7 +1,4 @@ -import atexit import contextlib -import functools -import inspect # Copyright (c) 2011, 2012 # Authors: Pietro Berkes, @@ -13,14 +10,6 @@ import inspect # Giorgio Patrini # Thierry Guillemot # License: BSD 3 clause -import os -import os.path as op -import re -import shutil -import sys -import tempfile -import unittest -import warnings from collections.abc import Iterable as Iterable, Sequence from functools import wraps as wraps from inspect import signature as signature @@ -33,14 +22,9 @@ from subprocess import ( from typing import Any, Callable, ClassVar, Sequence from unittest import TestCase as TestCase -import joblib -import numpy as np -import scipy as sp -import sklearn from numpy import ndarray from numpy.random import RandomState from numpy.testing import ( - assert_allclose as np_assert_allclose, assert_almost_equal, assert_approx_equal, assert_array_almost_equal, diff --git a/stubs/sklearn/utils/class_weight.pyi b/stubs/sklearn/utils/class_weight.pyi index 7ef26a28..ad3ef6a0 100644 --- a/stubs/sklearn/utils/class_weight.pyi +++ b/stubs/sklearn/utils/class_weight.pyi @@ -1,6 +1,5 @@ from typing import Mapping -import numpy as np from numpy import ndarray from scipy import sparse as sparse diff --git a/stubs/sklearn/utils/deprecation.pyi b/stubs/sklearn/utils/deprecation.pyi index 4c5d5567..72c8ffd8 100644 --- a/stubs/sklearn/utils/deprecation.pyi +++ b/stubs/sklearn/utils/deprecation.pyi @@ -1,5 +1,3 @@ -import functools -import warnings from typing import Any, Callable __all__ = ["deprecated"] diff --git a/stubs/sklearn/utils/discovery.pyi b/stubs/sklearn/utils/discovery.pyi index cd24fb97..3b500373 100644 --- a/stubs/sklearn/utils/discovery.pyi +++ b/stubs/sklearn/utils/discovery.pyi @@ -1,5 +1,3 @@ -import inspect -import pkgutil from importlib import import_module as import_module from operator import itemgetter as itemgetter from pathlib import Path as Path diff --git a/stubs/sklearn/utils/estimator_checks.pyi b/stubs/sklearn/utils/estimator_checks.pyi index 87c35521..65692a84 100644 --- a/stubs/sklearn/utils/estimator_checks.pyi +++ b/stubs/sklearn/utils/estimator_checks.pyi @@ -1,7 +1,3 @@ -import pickle -import re -import types -import warnings from collections.abc import Generator from copy import deepcopy as deepcopy from functools import partial as partial, wraps as wraps @@ -9,8 +5,6 @@ from inspect import signature as signature from numbers import Real as Real from typing import Sequence -import joblib -import numpy as np from _pytest.mark.structures import _ParametrizeMarkDecorator from scipy import sparse as sparse from scipy.stats import rankdata as rankdata diff --git a/stubs/sklearn/utils/extmath.pyi b/stubs/sklearn/utils/extmath.pyi index 3273b9ac..e0ee4317 100644 --- a/stubs/sklearn/utils/extmath.pyi +++ b/stubs/sklearn/utils/extmath.pyi @@ -1,7 +1,5 @@ -import warnings from typing import Literal, Sequence -import numpy as np from numpy import ndarray from numpy.random import RandomState from scipy import linalg as linalg, sparse as sparse diff --git a/stubs/sklearn/utils/graph.pyi b/stubs/sklearn/utils/graph.pyi index e9329e47..26d9a0a7 100644 --- a/stubs/sklearn/utils/graph.pyi +++ b/stubs/sklearn/utils/graph.pyi @@ -1,4 +1,3 @@ -import numpy as np from scipy import sparse as sparse from .._typing import Int, MatrixLike diff --git a/stubs/sklearn/utils/metaestimators.pyi b/stubs/sklearn/utils/metaestimators.pyi index c1ee0e63..bb1701e4 100644 --- a/stubs/sklearn/utils/metaestimators.pyi +++ b/stubs/sklearn/utils/metaestimators.pyi @@ -1,11 +1,8 @@ -import warnings from abc import ABCMeta, abstractmethod from contextlib import suppress as suppress from operator import attrgetter as attrgetter from typing import Any, Callable, ClassVar, List, Sequence -import numpy as np - from ..base import BaseEstimator from ._available_if import _AvailableIfDescriptor, available_if diff --git a/stubs/sklearn/utils/multiclass.pyi b/stubs/sklearn/utils/multiclass.pyi index 666637bd..8a4a5c90 100644 --- a/stubs/sklearn/utils/multiclass.pyi +++ b/stubs/sklearn/utils/multiclass.pyi @@ -1,11 +1,9 @@ # Author: Arnaud Joly, Joel Nothman, Hamzeh Alsalhi # # License: BSD 3 clause -import warnings from collections.abc import Sequence as Sequence from itertools import chain as chain -import numpy as np from numpy import ndarray from scipy.sparse import dok_matrix as dok_matrix, issparse as issparse, lil_matrix as lil_matrix diff --git a/stubs/sklearn/utils/optimize.pyi b/stubs/sklearn/utils/optimize.pyi index 1e911ce0..f85cd063 100644 --- a/stubs/sklearn/utils/optimize.pyi +++ b/stubs/sklearn/utils/optimize.pyi @@ -1,6 +1,4 @@ -import warnings -import numpy as np from ..exceptions import ConvergenceWarning as ConvergenceWarning diff --git a/stubs/sklearn/utils/parallel.pyi b/stubs/sklearn/utils/parallel.pyi index 0a483b51..c6c0a482 100644 --- a/stubs/sklearn/utils/parallel.pyi +++ b/stubs/sklearn/utils/parallel.pyi @@ -1,5 +1,3 @@ -import functools -import warnings from functools import update_wrapper as update_wrapper from typing import Any, Callable, Iterable, Iterator diff --git a/stubs/sklearn/utils/random.pyi b/stubs/sklearn/utils/random.pyi index be98b88c..41b88b84 100644 --- a/stubs/sklearn/utils/random.pyi +++ b/stubs/sklearn/utils/random.pyi @@ -1,10 +1,7 @@ -import array # Author: Hamzeh Alsalhi # # License: BSD 3 clause -import numpy as np -import scipy.sparse as sp from . import check_random_state as check_random_state from ._random import sample_without_replacement diff --git a/stubs/sklearn/utils/setup.pyi b/stubs/sklearn/utils/setup.pyi index a2112baa..b3ddf582 100644 --- a/stubs/sklearn/utils/setup.pyi +++ b/stubs/sklearn/utils/setup.pyi @@ -1,9 +1,4 @@ -import os -from os.path import join -from numpy.distutils.core import setup -from numpy.distutils.misc_util import Configuration -from .._build_utils import gen_from_templates def configuration(parent_package: str = "", top_path=None): ... diff --git a/stubs/sklearn/utils/sparsefuncs.pyi b/stubs/sklearn/utils/sparsefuncs.pyi index 6fa7b79e..99c089c8 100644 --- a/stubs/sklearn/utils/sparsefuncs.pyi +++ b/stubs/sklearn/utils/sparsefuncs.pyi @@ -1,19 +1,12 @@ -import numpy as np # Authors: Manoj Kumar # Thomas Unterthiner # Giorgio Patrini # # License: BSD 3 clause -import scipy.sparse as sp from numpy import ndarray from .._typing import ArrayLike, Int, MatrixLike -from .sparsefuncs_fast import ( - csc_mean_variance_axis0 as _csc_mean_var_axis0, - csr_mean_variance_axis0 as _csr_mean_var_axis0, - incr_mean_variance_axis0 as _incr_mean_var_axis0, -) def inplace_csr_column_scale(X: MatrixLike, scale: MatrixLike): ... def inplace_csr_row_scale(X: MatrixLike, scale: ArrayLike): ... diff --git a/stubs/sklearn/utils/stats.pyi b/stubs/sklearn/utils/stats.pyi index c65d347c..d87d57fc 100644 --- a/stubs/sklearn/utils/stats.pyi +++ b/stubs/sklearn/utils/stats.pyi @@ -1,3 +1,2 @@ -import numpy as np from .extmath import stable_cumsum as stable_cumsum diff --git a/stubs/sklearn/utils/validation.pyi b/stubs/sklearn/utils/validation.pyi index be360ffa..c30c6412 100644 --- a/stubs/sklearn/utils/validation.pyi +++ b/stubs/sklearn/utils/validation.pyi @@ -1,15 +1,9 @@ -import numbers -import operator -import warnings from contextlib import suppress as suppress from functools import wraps as wraps from inspect import Parameter as Parameter, isclass as isclass, signature as signature from numbers import Integral, Number, Real from typing import Any, Callable, Literal, Sequence, Type -import joblib -import numpy as np -import scipy.sparse as sp from joblib.memory import Memory from numpy import ndarray from numpy.core.numeric import ComplexWarning as ComplexWarning @@ -18,7 +12,6 @@ from pandas import DataFrame from scipy.sparse import spmatrix from scipy.sparse._coo import coo_matrix -from .. import get_config as _get_config from .._typing import ArrayLike, Float, Int, MatrixLike from ..base import BaseEstimator from ..exceptions import ( diff --git a/stubs/sympy-stubs/__init__.pyi b/stubs/sympy-stubs/__init__.pyi index 99897700..5baff088 100644 --- a/stubs/sympy-stubs/__init__.pyi +++ b/stubs/sympy-stubs/__init__.pyi @@ -1,6 +1,5 @@ import sys -import mpmath from sympy.algebras import Quaternion from sympy.assumptions import ( AppliedPredicate, @@ -128,7 +127,6 @@ from sympy.core import ( vectorize, zoo, ) -from sympy.core.cache import lazy_function from sympy.discrete import ( convolution, covering_product, diff --git a/stubs/sympy-stubs/core/multidimensional.pyi b/stubs/sympy-stubs/core/multidimensional.pyi index 06c07b9b..e8cea9fd 100644 --- a/stubs/sympy-stubs/core/multidimensional.pyi +++ b/stubs/sympy-stubs/core/multidimensional.pyi @@ -1,5 +1,5 @@ from functools import _Wrapped -from typing import Any, Callable +from typing import Any def apply_on_element(f, args, kwargs, n) -> list[list[Any] | Any]: ... def iter_copy(structure) -> list[Any]: ... diff --git a/stubs/sympy-stubs/discrete/convolutions.pyi b/stubs/sympy-stubs/discrete/convolutions.pyi index 5dcd4d31..39ad2574 100644 --- a/stubs/sympy-stubs/discrete/convolutions.pyi +++ b/stubs/sympy-stubs/discrete/convolutions.pyi @@ -1,7 +1,5 @@ from typing import Any -from sympy.core.numbers import Integer, Rational - def convolution(a, b, cycle=..., dps=..., prime=..., dyadic=..., subset=...) -> list[int] | list[Any | int] | Any | list[Any]: ... def convolution_fft(a, b, dps=...) -> list[Any] | Any: ... def convolution_ntt(a, b, prime) -> list[int] | list[Any | int] | Any: ... diff --git a/stubs/sympy-stubs/functions/special/bessel.pyi b/stubs/sympy-stubs/functions/special/bessel.pyi index 7b724c74..65bebc9b 100644 --- a/stubs/sympy-stubs/functions/special/bessel.pyi +++ b/stubs/sympy-stubs/functions/special/bessel.pyi @@ -1,7 +1,7 @@ from functools import _Wrapped -from typing import Any, Callable +from typing import Any -from numpy import floating, ndarray as NDArray +from numpy import ndarray as NDArray from sympy.core.basic import Basic from sympy.core.cache import cacheit from sympy.core.function import Function, UndefinedFunction diff --git a/stubs/sympy-stubs/integrals/laplace.pyi b/stubs/sympy-stubs/integrals/laplace.pyi index e9a371ce..04bc20df 100644 --- a/stubs/sympy-stubs/integrals/laplace.pyi +++ b/stubs/sympy-stubs/integrals/laplace.pyi @@ -1,8 +1,7 @@ -from typing import Any, Callable +from typing import Any from sympy import MatrixBase from sympy.core.basic import Basic -from sympy.core.expr import Expr from sympy.core.function import UndefinedFunction from sympy.core.logic import And from sympy.core.mul import Mul diff --git a/stubs/sympy-stubs/integrals/manualintegrate.pyi b/stubs/sympy-stubs/integrals/manualintegrate.pyi index c73fb174..72e0d430 100644 --- a/stubs/sympy-stubs/integrals/manualintegrate.pyi +++ b/stubs/sympy-stubs/integrals/manualintegrate.pyi @@ -7,7 +7,6 @@ from sympy.core.expr import Expr from sympy.core.function import Derivative, UndefinedFunction from sympy.core.relational import Boolean from sympy.core.symbol import Symbol, Wild -from sympy.functions.elementary.exponential import exp from sympy.functions.elementary.piecewise import Piecewise from sympy.tensor.array.array_derivatives import ArrayDerivative diff --git a/stubs/sympy-stubs/multipledispatch/conflict.pyi b/stubs/sympy-stubs/multipledispatch/conflict.pyi index 09aa5c30..81bd3a40 100644 --- a/stubs/sympy-stubs/multipledispatch/conflict.pyi +++ b/stubs/sympy-stubs/multipledispatch/conflict.pyi @@ -1,4 +1,4 @@ -from typing import Any, _T_co +from typing import _T_co class AmbiguityWarning(Warning): ... diff --git a/stubs/sympy-stubs/ntheory/generate.pyi b/stubs/sympy-stubs/ntheory/generate.pyi index 7cf088fc..8d869210 100644 --- a/stubs/sympy-stubs/ntheory/generate.pyi +++ b/stubs/sympy-stubs/ntheory/generate.pyi @@ -2,8 +2,6 @@ from array import array from typing import Any, Generator, Literal from sympy import Function -from sympy.core.function import UndefinedFunction -from sympy.utilities.decorator import deprecated class Sieve: def __init__(self) -> None: ... diff --git a/stubs/sympy-stubs/ntheory/partitions_.pyi b/stubs/sympy-stubs/ntheory/partitions_.pyi index 54606f4c..7b7af5b1 100644 --- a/stubs/sympy-stubs/ntheory/partitions_.pyi +++ b/stubs/sympy-stubs/ntheory/partitions_.pyi @@ -1,5 +1,3 @@ -from sympy.core.function import UndefinedFunction -from sympy.utilities.decorator import deprecated def npartitions(n, verbose=...) -> int: ... diff --git a/stubs/sympy-stubs/ntheory/residue_ntheory.pyi b/stubs/sympy-stubs/ntheory/residue_ntheory.pyi index f25b8d0d..0faa51f7 100644 --- a/stubs/sympy-stubs/ntheory/residue_ntheory.pyi +++ b/stubs/sympy-stubs/ntheory/residue_ntheory.pyi @@ -1,8 +1,6 @@ from typing import Any, Generator, Literal from sympy import Function -from sympy.core.function import UndefinedFunction -from sympy.utilities.decorator import deprecated def n_order(a, n) -> Literal[1]: ... def primitive_root(p) -> int | None: ... diff --git a/stubs/sympy-stubs/physics/matrices.pyi b/stubs/sympy-stubs/physics/matrices.pyi index 393ae9ab..2e787d99 100644 --- a/stubs/sympy-stubs/physics/matrices.pyi +++ b/stubs/sympy-stubs/physics/matrices.pyi @@ -1,6 +1,5 @@ from sympy.matrices import Matrix from sympy.matrices.dense import MutableDenseMatrix -from sympy.utilities.decorator import deprecated def msigma(i) -> MutableDenseMatrix: ... def pat_matrix(m, dx, dy, dz): ... diff --git a/stubs/sympy-stubs/plotting/pygletplot/__init__.pyi b/stubs/sympy-stubs/plotting/pygletplot/__init__.pyi index 37206008..ad063d8c 100644 --- a/stubs/sympy-stubs/plotting/pygletplot/__init__.pyi +++ b/stubs/sympy-stubs/plotting/pygletplot/__init__.pyi @@ -1,4 +1,3 @@ -from sympy.plotting.pygletplot.plot import PygletPlot as Plot from sympy.utilities.decorator import doctest_depends_on @doctest_depends_on(modules=("pyglet",)) diff --git a/stubs/sympy-stubs/polys/domains/__init__.pyi b/stubs/sympy-stubs/polys/domains/__init__.pyi index 5bd5f399..c367aec0 100644 --- a/stubs/sympy-stubs/polys/domains/__init__.pyi +++ b/stubs/sympy-stubs/polys/domains/__init__.pyi @@ -1,4 +1,3 @@ -from sympy.external.gmpy import GROUND_TYPES from sympy.polys.domains.algebraicfield import AlgebraicField from sympy.polys.domains.complexfield import CC, ComplexField from sympy.polys.domains.domain import Domain @@ -7,15 +6,9 @@ from sympy.polys.domains.expressionrawdomain import EXRAW from sympy.polys.domains.finitefield import FF, GF, FiniteField from sympy.polys.domains.fractionfield import FractionField from sympy.polys.domains.gaussiandomains import QQ_I, ZZ_I -from sympy.polys.domains.gmpyfinitefield import GMPYFiniteField -from sympy.polys.domains.gmpyintegerring import GMPYIntegerRing -from sympy.polys.domains.gmpyrationalfield import GMPYRationalField from sympy.polys.domains.integerring import ZZ, IntegerRing from sympy.polys.domains.polynomialring import PolynomialRing -from sympy.polys.domains.pythonfinitefield import PythonFiniteField -from sympy.polys.domains.pythonintegerring import PythonIntegerRing from sympy.polys.domains.pythonrational import PythonRational -from sympy.polys.domains.pythonrationalfield import PythonRationalField from sympy.polys.domains.rationalfield import QQ, RationalField from sympy.polys.domains.realfield import RR, RealField diff --git a/stubs/sympy-stubs/polys/domains/characteristiczero.pyi b/stubs/sympy-stubs/polys/domains/characteristiczero.pyi index 1c605087..34b5f2a8 100644 --- a/stubs/sympy-stubs/polys/domains/characteristiczero.pyi +++ b/stubs/sympy-stubs/polys/domains/characteristiczero.pyi @@ -1,7 +1,6 @@ from typing import Literal from sympy.polys.domains.domain import Domain -from sympy.utilities import public class CharacteristicZero(Domain): has_CharacteristicZero = ... diff --git a/stubs/sympy-stubs/polys/domains/expressiondomain.pyi b/stubs/sympy-stubs/polys/domains/expressiondomain.pyi index e3085ab8..521a7598 100644 --- a/stubs/sympy-stubs/polys/domains/expressiondomain.pyi +++ b/stubs/sympy-stubs/polys/domains/expressiondomain.pyi @@ -2,7 +2,6 @@ from types import NotImplementedType from typing_extensions import Self from sympy.polys.domains.characteristiczero import CharacteristicZero -from sympy.polys.domains.domainelement import DomainElement from sympy.polys.domains.field import Field from sympy.polys.domains.simpledomain import SimpleDomain from sympy.polys.polyutils import PicklableWithSlots diff --git a/stubs/sympy-stubs/polys/domains/fractionfield.pyi b/stubs/sympy-stubs/polys/domains/fractionfield.pyi index 8bbdd79b..00b418b1 100644 --- a/stubs/sympy-stubs/polys/domains/fractionfield.pyi +++ b/stubs/sympy-stubs/polys/domains/fractionfield.pyi @@ -3,7 +3,6 @@ from typing import Any from sympy.polys.domains.compositedomain import CompositeDomain from sympy.polys.domains.field import Field from sympy.polys.fields import FracElement -from sympy.utilities import public class FractionField(Field, CompositeDomain): is_Frac = ... diff --git a/stubs/sympy-stubs/polys/domains/gmpyintegerring.pyi b/stubs/sympy-stubs/polys/domains/gmpyintegerring.pyi index a198d34a..87603c14 100644 --- a/stubs/sympy-stubs/polys/domains/gmpyintegerring.pyi +++ b/stubs/sympy-stubs/polys/domains/gmpyintegerring.pyi @@ -3,7 +3,6 @@ from typing import Any from sympy.core.numbers import Integer from sympy.polys.domains.groundtypes import GMPYInteger, _GMPYInteger from sympy.polys.domains.integerring import IntegerRing -from sympy.utilities import public class GMPYIntegerRing(IntegerRing): dtype = GMPYInteger diff --git a/stubs/sympy-stubs/polys/domains/gmpyrationalfield.pyi b/stubs/sympy-stubs/polys/domains/gmpyrationalfield.pyi index a0ff0f71..f8a9f4ad 100644 --- a/stubs/sympy-stubs/polys/domains/gmpyrationalfield.pyi +++ b/stubs/sympy-stubs/polys/domains/gmpyrationalfield.pyi @@ -3,7 +3,6 @@ from typing import Any from sympy.core.numbers import Rational from sympy.polys.domains.groundtypes import GMPYRational, _GMPYRational from sympy.polys.domains.rationalfield import RationalField -from sympy.utilities import public class GMPYRationalField(RationalField): dtype = GMPYRational diff --git a/stubs/sympy-stubs/polys/domains/integerring.pyi b/stubs/sympy-stubs/polys/domains/integerring.pyi index 71d891f7..61115f5f 100644 --- a/stubs/sympy-stubs/polys/domains/integerring.pyi +++ b/stubs/sympy-stubs/polys/domains/integerring.pyi @@ -5,7 +5,6 @@ from sympy.external.gmpy import MPZ from sympy.polys.domains.characteristiczero import CharacteristicZero from sympy.polys.domains.ring import Ring from sympy.polys.domains.simpledomain import SimpleDomain -from sympy.utilities import public class IntegerRing(Ring, CharacteristicZero, SimpleDomain): # type: ignore rep = ... diff --git a/stubs/sympy-stubs/polys/domains/polynomialring.pyi b/stubs/sympy-stubs/polys/domains/polynomialring.pyi index a859eb2f..f8e3a9fe 100644 --- a/stubs/sympy-stubs/polys/domains/polynomialring.pyi +++ b/stubs/sympy-stubs/polys/domains/polynomialring.pyi @@ -3,7 +3,6 @@ from typing import Any, Literal from sympy.polys.domains.compositedomain import CompositeDomain from sympy.polys.domains.ring import Ring from sympy.polys.rings import PolyElement -from sympy.utilities import public class PolynomialRing(Ring, CompositeDomain): is_Poly = ... diff --git a/stubs/sympy-stubs/polys/domains/pythonintegerring.pyi b/stubs/sympy-stubs/polys/domains/pythonintegerring.pyi index 4af331ed..bc83b8e6 100644 --- a/stubs/sympy-stubs/polys/domains/pythonintegerring.pyi +++ b/stubs/sympy-stubs/polys/domains/pythonintegerring.pyi @@ -3,7 +3,6 @@ from typing import Any, Literal from sympy.core.numbers import Integer from sympy.polys.domains.groundtypes import PythonInteger from sympy.polys.domains.integerring import IntegerRing -from sympy.utilities import public class PythonIntegerRing(IntegerRing): dtype = PythonInteger diff --git a/stubs/sympy-stubs/polys/domains/pythonrationalfield.pyi b/stubs/sympy-stubs/polys/domains/pythonrationalfield.pyi index 15944367..ca196c41 100644 --- a/stubs/sympy-stubs/polys/domains/pythonrationalfield.pyi +++ b/stubs/sympy-stubs/polys/domains/pythonrationalfield.pyi @@ -2,7 +2,6 @@ from typing import Any from sympy.core.numbers import Integer, Rational from sympy.polys.domains.rationalfield import RationalField -from sympy.utilities import public class PythonRationalField(RationalField): dtype = ... diff --git a/stubs/sympy-stubs/polys/domains/quotientring.pyi b/stubs/sympy-stubs/polys/domains/quotientring.pyi index 42113c6c..2d656a5d 100644 --- a/stubs/sympy-stubs/polys/domains/quotientring.pyi +++ b/stubs/sympy-stubs/polys/domains/quotientring.pyi @@ -3,7 +3,6 @@ from typing import Any from sympy.polys.agca.modules import FreeModuleQuotientRing from sympy.polys.domains.ring import Ring -from sympy.utilities import public class QuotientRingElement: def __init__(self, ring, data) -> None: ... diff --git a/stubs/sympy-stubs/polys/factortools.pyi b/stubs/sympy-stubs/polys/factortools.pyi index ebb26610..02c4a9f9 100644 --- a/stubs/sympy-stubs/polys/factortools.pyi +++ b/stubs/sympy-stubs/polys/factortools.pyi @@ -1,7 +1,5 @@ from typing import Any, Literal -from sympy.external.gmpy import GROUND_TYPES - def dup_trial_division(f, factors, K) -> list[Any]: ... def dmp_trial_division(f, factors, u, K) -> list[Any]: ... def dup_zz_mignotte_bound(f, K): ... diff --git a/stubs/sympy-stubs/polys/polyclasses.pyi b/stubs/sympy-stubs/polys/polyclasses.pyi index c001c44f..f05c0586 100644 --- a/stubs/sympy-stubs/polys/polyclasses.pyi +++ b/stubs/sympy-stubs/polys/polyclasses.pyi @@ -3,8 +3,6 @@ from typing import Any, Callable, Literal from typing_extensions import Self from sympy.core.sympify import CantSympify -from sympy.external.gmpy import GROUND_TYPES -from sympy.polys.domains import Domain from sympy.polys.polyutils import PicklableWithSlots class GenericPoly(PicklableWithSlots): diff --git a/stubs/sympy-stubs/series/__init__.pyi b/stubs/sympy-stubs/series/__init__.pyi index ccea0018..ac545c98 100644 --- a/stubs/sympy-stubs/series/__init__.pyi +++ b/stubs/sympy-stubs/series/__init__.pyi @@ -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 diff --git a/stubs/sympy-stubs/sets/__init__.pyi b/stubs/sympy-stubs/sets/__init__.pyi index 1a208028..291e1f76 100644 --- a/stubs/sympy-stubs/sets/__init__.pyi +++ b/stubs/sympy-stubs/sets/__init__.pyi @@ -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 ( diff --git a/stubs/sympy-stubs/solvers/__init__.pyi b/stubs/sympy-stubs/solvers/__init__.pyi index 71548427..9e1c1a86 100644 --- a/stubs/sympy-stubs/solvers/__init__.pyi +++ b/stubs/sympy-stubs/solvers/__init__.pyi @@ -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 diff --git a/stubs/sympy-stubs/stats/rv_interface.pyi b/stubs/sympy-stubs/stats/rv_interface.pyi index 02e26c1b..aae7c144 100644 --- a/stubs/sympy-stubs/stats/rv_interface.pyi +++ b/stubs/sympy-stubs/stats/rv_interface.pyi @@ -10,17 +10,13 @@ from sympy.core.relational import Ne, Relational from sympy.series.order import Order from sympy.sets.sets import FiniteSet, Set from sympy.stats.rv import ( - PSpace, cdf, characteristic_function, density, dependent, - expectation, given, independent, - is_random, moment_generating_function, - probability, pspace, quantile, random_symbols, diff --git a/stubs/sympy-stubs/strategies/tree.pyi b/stubs/sympy-stubs/strategies/tree.pyi index bfcd1c8f..35706eb9 100644 --- a/stubs/sympy-stubs/strategies/tree.pyi +++ b/stubs/sympy-stubs/strategies/tree.pyi @@ -1,4 +1,4 @@ -from typing import Any, Callable, Generator +from typing import Any, Callable def treeapply(tree, join, leaf=...): ... def greedy(tree, objective=..., **kwargs): ... diff --git a/stubs/sympy-stubs/utilities/decorator.pyi b/stubs/sympy-stubs/utilities/decorator.pyi index 403f4ffd..4f6684fe 100644 --- a/stubs/sympy-stubs/utilities/decorator.pyi +++ b/stubs/sympy-stubs/utilities/decorator.pyi @@ -1,5 +1,4 @@ from functools import _Wrapped -from types import FunctionType from typing import Any, Callable def threaded_factory(func, use_add) -> _Wrapped[..., Any, ..., Any]: ... diff --git a/stubs/sympy-stubs/utilities/iterables.pyi b/stubs/sympy-stubs/utilities/iterables.pyi index 8ad1e0d0..aa86e6bd 100644 --- a/stubs/sympy-stubs/utilities/iterables.pyi +++ b/stubs/sympy-stubs/utilities/iterables.pyi @@ -4,7 +4,6 @@ from typing import Any, Generator, Iterator, Literal, NoReturn from typing_extensions import Never from sympy import Basic, Symbol -from sympy.utilities.decorator import deprecated def is_palindromic(s, i=..., j=...) -> bool: ... def flatten(iterable, levels=..., cls=...) -> list[Any]: ... diff --git a/stubs/sympy-stubs/utilities/mathml/__init__.pyi b/stubs/sympy-stubs/utilities/mathml/__init__.pyi index 030f5bc2..375776c8 100644 --- a/stubs/sympy-stubs/utilities/mathml/__init__.pyi +++ b/stubs/sympy-stubs/utilities/mathml/__init__.pyi @@ -1,4 +1,3 @@ -from pathlib import Path from sympy.utilities.decorator import doctest_depends_on diff --git a/stubs/vispy/app/_default_app.pyi b/stubs/vispy/app/_default_app.pyi index f8c3184c..74da981b 100644 --- a/stubs/vispy/app/_default_app.pyi +++ b/stubs/vispy/app/_default_app.pyi @@ -2,7 +2,6 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -from .application import Application # Initialize default app # Only for use within *this* module. diff --git a/stubs/vispy/app/application.pyi b/stubs/vispy/app/application.pyi index 01d90b61..e8686cab 100644 --- a/stubs/vispy/app/application.pyi +++ b/stubs/vispy/app/application.pyi @@ -4,12 +4,6 @@ from __future__ import division -import builtins -import os -import sys - -from .. import config -from ..util import logger from .base import BaseApplicationBackend as ApplicationBackend # noqa class Application(object): diff --git a/stubs/vispy/app/base.pyi b/stubs/vispy/app/base.pyi index 28f5f10d..a7722bad 100644 --- a/stubs/vispy/app/base.pyi +++ b/stubs/vispy/app/base.pyi @@ -2,10 +2,7 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -import time -from timeit import default_timer -from ..util import SimpleBunch class BaseApplicationBackend(object): def _vispy_get_backend_name(self): ... diff --git a/stubs/vispy/app/canvas.pyi b/stubs/vispy/app/canvas.pyi index a6eb7980..53b49272 100644 --- a/stubs/vispy/app/canvas.pyi +++ b/stubs/vispy/app/canvas.pyi @@ -4,22 +4,15 @@ from __future__ import division, print_function -import sys -from time import sleep from typing import Callable, Mapping -import numpy as np from numpy.typing import ArrayLike -from ..gloo import FrameBuffer, RenderBuffer -from ..gloo.context import GLContext, forget_canvas, set_current_canvas +from ..gloo.context import GLContext 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.event import Event from ..util.keys import Key -from ..util.ptime import time -from . import Application, use_app +from . import Application from .application import Application # todo: add functions for asking about current mouse/keyboard state diff --git a/stubs/vispy/color/color_array.pyi b/stubs/vispy/color/color_array.pyi index 9afcb49a..4d14f6d9 100644 --- a/stubs/vispy/color/color_array.pyi +++ b/stubs/vispy/color/color_array.pyi @@ -1,10 +1,5 @@ -from copy import deepcopy from typing import Literal, Sequence -import numpy as np - -from ..util import logger -from ._color_dict import _color_dict from .color_space import ( # noqa _hex_to_rgba, _hsv_to_rgb, diff --git a/stubs/vispy/color/color_space.pyi b/stubs/vispy/color/color_space.pyi index 2986ede3..ade74377 100644 --- a/stubs/vispy/color/color_space.pyi +++ b/stubs/vispy/color/color_space.pyi @@ -2,7 +2,6 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -import numpy as np ############################################################################### # Utility functions diff --git a/stubs/vispy/color/colormap.pyi b/stubs/vispy/color/colormap.pyi index bb23205d..2e07c3ad 100644 --- a/stubs/vispy/color/colormap.pyi +++ b/stubs/vispy/color/colormap.pyi @@ -1,13 +1,8 @@ -import warnings from typing import Sequence -import numpy as np from numpy.typing import ArrayLike, NDArray from .._typing import Scalar -from ..ext.cubehelix import cubehelix -from ..util.check_environment import has_matplotlib -from .color_array import ColorArray # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. diff --git a/stubs/vispy/ext/cocoapy.pyi b/stubs/vispy/ext/cocoapy.pyi index 76a79611..b2b39fe4 100644 --- a/stubs/vispy/ext/cocoapy.pyi +++ b/stubs/vispy/ext/cocoapy.pyi @@ -1,46 +1,7 @@ # -*- coding: utf-8 -*- -import platform -import struct -import sys from ctypes import ( - CFUNCTYPE, - POINTER, - ArgumentError, Structure, - alignment, - byref, - c_bool, - c_buffer, - c_byte, - c_char, - c_char_p, - c_double, - c_float, - c_int, - c_int8, - c_int16, - c_int32, - c_int64, - c_long, - c_longdouble, - c_longlong, - c_short, - c_size_t, - c_ubyte, - c_uint, - c_uint8, - c_uint32, - c_ulong, - c_ulonglong, - c_ushort, - c_void_p, - c_wchar, - cast, - cdll, - py_object, - sizeof, - util, ) # Based on Pyglet code diff --git a/stubs/vispy/ext/cubehelix.pyi b/stubs/vispy/ext/cubehelix.pyi index fbee4ba7..0ca09b3c 100644 --- a/stubs/vispy/ext/cubehelix.pyi +++ b/stubs/vispy/ext/cubehelix.pyi @@ -1,7 +1,5 @@ -from math import pi import numpy as np -from numpy import ndarray from .._typing import Scalar diff --git a/stubs/vispy/geometry/calculations.pyi b/stubs/vispy/geometry/calculations.pyi index bf008775..2db80bad 100644 --- a/stubs/vispy/geometry/calculations.pyi +++ b/stubs/vispy/geometry/calculations.pyi @@ -1,4 +1,3 @@ -import numpy as np from numpy.typing import NDArray # -*- coding: utf-8 -*- diff --git a/stubs/vispy/geometry/curves.pyi b/stubs/vispy/geometry/curves.pyi index 1d7b44f6..89e4b166 100644 --- a/stubs/vispy/geometry/curves.pyi +++ b/stubs/vispy/geometry/curves.pyi @@ -1,6 +1,4 @@ -import math -import numpy as np from numpy.typing import ArrayLike # diff --git a/stubs/vispy/geometry/generation.pyi b/stubs/vispy/geometry/generation.pyi index 07930653..50834282 100644 --- a/stubs/vispy/geometry/generation.pyi +++ b/stubs/vispy/geometry/generation.pyi @@ -1,4 +1,3 @@ -import numpy as np from numpy.typing import ArrayLike, NDArray from ..geometry.meshdata import MeshData diff --git a/stubs/vispy/geometry/isocurve.pyi b/stubs/vispy/geometry/isocurve.pyi index 720e6cdc..4bd3fc8f 100644 --- a/stubs/vispy/geometry/isocurve.pyi +++ b/stubs/vispy/geometry/isocurve.pyi @@ -1,4 +1,3 @@ -import numpy as np from numpy.typing import NDArray # -*- coding: utf-8 -*- diff --git a/stubs/vispy/geometry/isosurface.pyi b/stubs/vispy/geometry/isosurface.pyi index 3e827536..70f5c2f3 100644 --- a/stubs/vispy/geometry/isosurface.pyi +++ b/stubs/vispy/geometry/isosurface.pyi @@ -1,4 +1,3 @@ -import numpy as np _data_cache: None = ... diff --git a/stubs/vispy/geometry/meshdata.pyi b/stubs/vispy/geometry/meshdata.pyi index f49c3ddd..00593511 100644 --- a/stubs/vispy/geometry/meshdata.pyi +++ b/stubs/vispy/geometry/meshdata.pyi @@ -1,6 +1,5 @@ from typing import Mapping -import numpy as np from numpy.typing import ArrayLike, NDArray # -*- coding: utf-8 -*- diff --git a/stubs/vispy/geometry/normals.pyi b/stubs/vispy/geometry/normals.pyi index 003eb623..395e1753 100644 --- a/stubs/vispy/geometry/normals.pyi +++ b/stubs/vispy/geometry/normals.pyi @@ -1,4 +1,3 @@ -import numpy as np from numpy.typing import NDArray # -*- coding: utf-8 -*- diff --git a/stubs/vispy/geometry/parametric.pyi b/stubs/vispy/geometry/parametric.pyi index 37a5585c..6cdc7807 100644 --- a/stubs/vispy/geometry/parametric.pyi +++ b/stubs/vispy/geometry/parametric.pyi @@ -4,9 +4,7 @@ # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -import numpy as np -from .normals import normals def surface( func, diff --git a/stubs/vispy/geometry/polygon.pyi b/stubs/vispy/geometry/polygon.pyi index da556255..811d5580 100644 --- a/stubs/vispy/geometry/polygon.pyi +++ b/stubs/vispy/geometry/polygon.pyi @@ -1,8 +1,5 @@ -import numpy as np from numpy.typing import ArrayLike -from .triangulation import Triangulation - # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Vispy Development Team. All Rights Reserved. diff --git a/stubs/vispy/geometry/rect.pyi b/stubs/vispy/geometry/rect.pyi index 21751d9d..a2af3560 100644 --- a/stubs/vispy/geometry/rect.pyi +++ b/stubs/vispy/geometry/rect.pyi @@ -1,4 +1,3 @@ -import numpy as np class Rect(object): def __init__(self, *args, **kwargs): ... diff --git a/stubs/vispy/geometry/torusknot.pyi b/stubs/vispy/geometry/torusknot.pyi index d3c1faef..6b5f5e76 100644 --- a/stubs/vispy/geometry/torusknot.pyi +++ b/stubs/vispy/geometry/torusknot.pyi @@ -1,9 +1,5 @@ from __future__ import division -from math import gcd - -import numpy as np - class TorusKnot(object): def __init__( self, diff --git a/stubs/vispy/geometry/triangulation.pyi b/stubs/vispy/geometry/triangulation.pyi index b7d79b50..3a4eed45 100644 --- a/stubs/vispy/geometry/triangulation.pyi +++ b/stubs/vispy/geometry/triangulation.pyi @@ -1,7 +1,4 @@ -from collections import OrderedDict -from itertools import permutations -import numpy as np from numpy.typing import ArrayLike # -*- coding: utf-8 -*- diff --git a/stubs/vispy/gloo/buffer.pyi b/stubs/vispy/gloo/buffer.pyi index 9412aa68..468fdd7d 100644 --- a/stubs/vispy/gloo/buffer.pyi +++ b/stubs/vispy/gloo/buffer.pyi @@ -1,12 +1,7 @@ -import weakref -from os import path as op -from traceback import extract_stack, format_list -import numpy as np from numpy.typing import NDArray from ..gloo.buffer import DataBuffer -from ..util import logger from .globject import GLObject # -*- coding: utf-8 -*- diff --git a/stubs/vispy/gloo/context.pyi b/stubs/vispy/gloo/context.pyi index 5d988330..6046916d 100644 --- a/stubs/vispy/gloo/context.pyi +++ b/stubs/vispy/gloo/context.pyi @@ -1,10 +1,6 @@ -import weakref -from copy import deepcopy from typing import Any, Mapping -from .. import config from ..util.event import Event -from .glir import BaseGlirParser, GlirParser, GlirQueue, glir_logger from .wrappers import BaseGlooFunctions # -*- coding: utf-8 -*- diff --git a/stubs/vispy/gloo/framebuffer.pyi b/stubs/vispy/gloo/framebuffer.pyi index c57ec827..ae0db2bd 100644 --- a/stubs/vispy/gloo/framebuffer.pyi +++ b/stubs/vispy/gloo/framebuffer.pyi @@ -3,10 +3,7 @@ from typing import Literal from numpy.typing import ArrayLike from ..gloo.framebuffer import RenderBuffer -from .context import get_current_canvas from .globject import GLObject -from .texture import Texture2D -from .wrappers import _check_valid, read_pixels # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- diff --git a/stubs/vispy/gloo/gl/_gl2.pyi b/stubs/vispy/gloo/gl/_gl2.pyi index 831103f5..451991f2 100644 --- a/stubs/vispy/gloo/gl/_gl2.pyi +++ b/stubs/vispy/gloo/gl/_gl2.pyi @@ -1,6 +1,4 @@ -import ctypes -from .gl2 import _get_gl_func, _lib # void = glActiveTexture(GLenum texture) def glActiveTexture(texture): ... diff --git a/stubs/vispy/gloo/gl/_pyopengl2.pyi b/stubs/vispy/gloo/gl/_pyopengl2.pyi index 71264edc..0099a279 100644 --- a/stubs/vispy/gloo/gl/_pyopengl2.pyi +++ b/stubs/vispy/gloo/gl/_pyopengl2.pyi @@ -1,4 +1,3 @@ -import ctypes def glBindAttribLocation(program, index, name): ... def glBufferData(target, data, usage): ... diff --git a/stubs/vispy/gloo/gl/dummy.pyi b/stubs/vispy/gloo/gl/dummy.pyi index 8c439f17..c9bc9d0a 100644 --- a/stubs/vispy/gloo/gl/dummy.pyi +++ b/stubs/vispy/gloo/gl/dummy.pyi @@ -2,7 +2,7 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -from . import BaseGLProxy, _copy_gl_functions +from . import BaseGLProxy from ._constants import * # noqa class DummyProxy(BaseGLProxy): diff --git a/stubs/vispy/gloo/gl/gl2.pyi b/stubs/vispy/gloo/gl/gl2.pyi index ab0917fe..d6d3bd4d 100644 --- a/stubs/vispy/gloo/gl/gl2.pyi +++ b/stubs/vispy/gloo/gl/gl2.pyi @@ -2,12 +2,7 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -import ctypes.util -import os -import sys -from ...util import logger -from . import _copy_gl_functions from ._constants import * # noqa # Ctypes stuff diff --git a/stubs/vispy/gloo/gl/glplus.pyi b/stubs/vispy/gloo/gl/glplus.pyi index 97a62f9e..aea7b5fe 100644 --- a/stubs/vispy/gloo/gl/glplus.pyi +++ b/stubs/vispy/gloo/gl/glplus.pyi @@ -2,7 +2,6 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -from . import _constants, _pyopengl2 def _inject(): ... diff --git a/stubs/vispy/gloo/gl/pyopengl2.pyi b/stubs/vispy/gloo/gl/pyopengl2.pyi index 9090aff5..df83ba5f 100644 --- a/stubs/vispy/gloo/gl/pyopengl2.pyi +++ b/stubs/vispy/gloo/gl/pyopengl2.pyi @@ -2,8 +2,6 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -from ...util import logger -from . import _copy_gl_functions from ._constants import * # noqa def _patch(): ... diff --git a/stubs/vispy/gloo/glir.pyi b/stubs/vispy/gloo/glir.pyi index e18d9942..6d0d22a5 100644 --- a/stubs/vispy/gloo/glir.pyi +++ b/stubs/vispy/gloo/glir.pyi @@ -4,17 +4,8 @@ # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -import json -import os -import re -import sys -import weakref -from distutils.version import LooseVersion -import numpy as np -from ..util import logger -from . import gl # TODO: expose these via an extension space in .gl? _internalformats: list = ... diff --git a/stubs/vispy/gloo/globject.pyi b/stubs/vispy/gloo/globject.pyi index 775dfe77..de0e866e 100644 --- a/stubs/vispy/gloo/globject.pyi +++ b/stubs/vispy/gloo/globject.pyi @@ -4,7 +4,6 @@ # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -from .glir import GlirQueue class GLObject(object): # Type of GLIR object, reset in subclasses diff --git a/stubs/vispy/gloo/preprocessor.pyi b/stubs/vispy/gloo/preprocessor.pyi index 8b8f1df4..6df072bf 100644 --- a/stubs/vispy/gloo/preprocessor.pyi +++ b/stubs/vispy/gloo/preprocessor.pyi @@ -3,10 +3,7 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -import re -from .. import glsl -from ..util import logger def remove_comments(code): ... def merge_includes(code): ... diff --git a/stubs/vispy/gloo/program.pyi b/stubs/vispy/gloo/program.pyi index 25dba9a6..26b03867 100644 --- a/stubs/vispy/gloo/program.pyi +++ b/stubs/vispy/gloo/program.pyi @@ -1,16 +1,9 @@ -import re -import numpy as np from numpy.typing import ArrayLike from ..gloo.buffer import VertexBuffer -from ..util import logger -from .buffer import DataBuffer, IndexBuffer, VertexBuffer -from .context import get_current_canvas +from .buffer import VertexBuffer from .globject import GLObject -from .preprocessor import preprocess -from .texture import BaseTexture, Texture1D, Texture2D, Texture3D, TextureCube -from .util import check_enum # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- diff --git a/stubs/vispy/gloo/texture.pyi b/stubs/vispy/gloo/texture.pyi index ec83fb1f..5f023adb 100644 --- a/stubs/vispy/gloo/texture.pyi +++ b/stubs/vispy/gloo/texture.pyi @@ -1,12 +1,9 @@ -import math -import warnings import numpy as np -from numpy import dtype, ndarray +from numpy import ndarray from numpy.typing import NDArray from .globject import GLObject -from .util import check_enum # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- diff --git a/stubs/vispy/gloo/util.pyi b/stubs/vispy/gloo/util.pyi index 283c0238..9c3ae8f9 100644 --- a/stubs/vispy/gloo/util.pyi +++ b/stubs/vispy/gloo/util.pyi @@ -1,5 +1,4 @@ from ..gloo.texture import Texture2D -from .wrappers import read_pixels # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- diff --git a/stubs/vispy/gloo/wrappers.pyi b/stubs/vispy/gloo/wrappers.pyi index 25729acb..d80810e4 100644 --- a/stubs/vispy/gloo/wrappers.pyi +++ b/stubs/vispy/gloo/wrappers.pyi @@ -1,14 +1,8 @@ -from copy import deepcopy from typing import Literal, Mapping import numpy as np -from numpy import dtype from numpy.typing import ArrayLike -from ..color import Color -from ..util import logger -from . import gl - # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Vispy Development Team. All Rights Reserved. diff --git a/stubs/vispy/glsl/__init__.pyi b/stubs/vispy/glsl/__init__.pyi index 3663d9fc..a7da971b 100644 --- a/stubs/vispy/glsl/__init__.pyi +++ b/stubs/vispy/glsl/__init__.pyi @@ -4,7 +4,6 @@ # 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 diff --git a/stubs/vispy/glsl/build_spatial_filters.pyi b/stubs/vispy/glsl/build_spatial_filters.pyi index d7018e30..3ea6a82f 100644 --- a/stubs/vispy/glsl/build_spatial_filters.pyi +++ b/stubs/vispy/glsl/build_spatial_filters.pyi @@ -30,11 +30,7 @@ # policies, either expressed or implied, of Nicolas P. Rougier. # ----------------------------------------------------------------------------- -import math -from inspect import cleandoc -from itertools import product -import numpy as np class SpatialFilter: def __init__(self, radius=1): ... diff --git a/stubs/vispy/io/__init__.pyi b/stubs/vispy/io/__init__.pyi index cd4b541a..62199d94 100644 --- a/stubs/vispy/io/__init__.pyi +++ b/stubs/vispy/io/__init__.pyi @@ -2,7 +2,6 @@ # 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 ( # noqa load_crate as load_crate, diff --git a/stubs/vispy/io/datasets.pyi b/stubs/vispy/io/datasets.pyi index 54f0ec9f..6149c6d5 100644 --- a/stubs/vispy/io/datasets.pyi +++ b/stubs/vispy/io/datasets.pyi @@ -1,7 +1,5 @@ -from os import path as op import numpy as np -from numpy.typing import ArrayLike from ..util import load_data_file as load_data_file diff --git a/stubs/vispy/io/image.pyi b/stubs/vispy/io/image.pyi index 93cebc60..465ae570 100644 --- a/stubs/vispy/io/image.pyi +++ b/stubs/vispy/io/image.pyi @@ -1,5 +1,3 @@ -import struct -import zlib import numpy as np from numpy.typing import ArrayLike diff --git a/stubs/vispy/io/mesh.pyi b/stubs/vispy/io/mesh.pyi index 31ed55e7..1c874d94 100644 --- a/stubs/vispy/io/mesh.pyi +++ b/stubs/vispy/io/mesh.pyi @@ -1,12 +1,7 @@ -import os -from os import path as op import numpy as np from numpy.typing import ArrayLike -from .stl import load_stl -from .wavefront import WavefrontReader, WavefrontWriter - # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. diff --git a/stubs/vispy/io/stl.pyi b/stubs/vispy/io/stl.pyi index 52bbf015..f15365d5 100644 --- a/stubs/vispy/io/stl.pyi +++ b/stubs/vispy/io/stl.pyi @@ -1,6 +1,4 @@ -from typing import IO -import numpy as np from .._typing import FileLike diff --git a/stubs/vispy/io/wavefront.pyi b/stubs/vispy/io/wavefront.pyi index 457988a2..b9462176 100644 --- a/stubs/vispy/io/wavefront.pyi +++ b/stubs/vispy/io/wavefront.pyi @@ -1,13 +1,6 @@ -import time -from gzip import GzipFile -from os import path as op -import numpy as np from numpy.typing import NDArray -from ..geometry import _calculate_normals -from ..util import logger - # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. diff --git a/stubs/vispy/plot/fig.pyi b/stubs/vispy/plot/fig.pyi index 7a3923eb..cb1d8265 100644 --- a/stubs/vispy/plot/fig.pyi +++ b/stubs/vispy/plot/fig.pyi @@ -1,6 +1,5 @@ from ..scene import SceneCanvas from ..util.svg.color import Color -from .plotwidget import PlotWidget # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. diff --git a/stubs/vispy/plot/plotwidget.pyi b/stubs/vispy/plot/plotwidget.pyi index acbe17d8..580c7659 100644 --- a/stubs/vispy/plot/plotwidget.pyi +++ b/stubs/vispy/plot/plotwidget.pyi @@ -6,7 +6,6 @@ from .. import scene from ..color import Color, Colormap from ..geometry import MeshData from ..geometry.meshdata import MeshData -from ..io import read_mesh from ..scene.visuals import Image, LinePlot, Mesh, Polygon, Spectrogram, Volume from ..scene.widgets.colorbar import ColorBarWidget diff --git a/stubs/vispy/scene/cameras/_base.pyi b/stubs/vispy/scene/cameras/_base.pyi index 0257bb56..a31aab97 100644 --- a/stubs/vispy/scene/cameras/_base.pyi +++ b/stubs/vispy/scene/cameras/_base.pyi @@ -1,11 +1,5 @@ # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -from .arcball import ArcballCamera -from .base_camera import BaseCamera -from .fly import FlyCamera -from .panzoom import PanZoomCamera -from .perspective import PerspectiveCamera -from .turntable import TurntableCamera def make_camera(cam_type: str, *args, **kwargs): ... diff --git a/stubs/vispy/scene/cameras/arcball.pyi b/stubs/vispy/scene/cameras/arcball.pyi index caffad9b..172d78ff 100644 --- a/stubs/vispy/scene/cameras/arcball.pyi +++ b/stubs/vispy/scene/cameras/arcball.pyi @@ -4,11 +4,6 @@ from __future__ import division -import numpy as np - -from ...util import transforms -from ...util.quaternion import Quaternion -from ...visuals.transforms import MatrixTransform from .perspective import Base3DRotationCamera class ArcballCamera(Base3DRotationCamera): diff --git a/stubs/vispy/scene/cameras/base_camera.pyi b/stubs/vispy/scene/cameras/base_camera.pyi index d6d4e419..e0033371 100644 --- a/stubs/vispy/scene/cameras/base_camera.pyi +++ b/stubs/vispy/scene/cameras/base_camera.pyi @@ -2,9 +2,7 @@ from typing import Literal, Mapping from numpy.typing import ArrayLike -from ...util import keys from ...util.event import Event -from ...visuals.transforms import MatrixTransform, NullTransform, STTransform, TransformCache from ..node import Node # -*- coding: utf-8 -*- diff --git a/stubs/vispy/scene/cameras/fly.pyi b/stubs/vispy/scene/cameras/fly.pyi index f1adc09a..c43a3dc0 100644 --- a/stubs/vispy/scene/cameras/fly.pyi +++ b/stubs/vispy/scene/cameras/fly.pyi @@ -1,10 +1,6 @@ -import math -import numpy as np -from ...util import keys from ...util.event import Event -from ...util.quaternion import Quaternion from .perspective import PerspectiveCamera # -*- coding: utf-8 -*- diff --git a/stubs/vispy/scene/cameras/magnify.pyi b/stubs/vispy/scene/cameras/magnify.pyi index 9004f50d..6b406259 100644 --- a/stubs/vispy/scene/cameras/magnify.pyi +++ b/stubs/vispy/scene/cameras/magnify.pyi @@ -1,7 +1,5 @@ -import numpy as np from ...util.event import Event -from ...visuals.transforms.nonlinear import Magnify1DTransform, MagnifyTransform from .panzoom import PanZoomCamera # -*- coding: utf-8 -*- diff --git a/stubs/vispy/scene/cameras/panzoom.pyi b/stubs/vispy/scene/cameras/panzoom.pyi index 78b3ec53..ef10868a 100644 --- a/stubs/vispy/scene/cameras/panzoom.pyi +++ b/stubs/vispy/scene/cameras/panzoom.pyi @@ -1,8 +1,6 @@ -import numpy as np from ...geometry import Rect from ...util.event import Event -from ...visuals.transforms import MatrixTransform, STTransform from .base_camera import BaseCamera # -*- coding: utf-8 -*- diff --git a/stubs/vispy/scene/cameras/perspective.pyi b/stubs/vispy/scene/cameras/perspective.pyi index 6f703682..9d8a3c20 100644 --- a/stubs/vispy/scene/cameras/perspective.pyi +++ b/stubs/vispy/scene/cameras/perspective.pyi @@ -1,11 +1,7 @@ -import math -import numpy as np from ..._typing import Scalar -from ...util import keys, transforms from ...util.event import Event -from ...visuals.transforms import MatrixTransform from .base_camera import BaseCamera # -*- coding: utf-8 -*- diff --git a/stubs/vispy/scene/cameras/turntable.pyi b/stubs/vispy/scene/cameras/turntable.pyi index 5d0e66d1..7607be48 100644 --- a/stubs/vispy/scene/cameras/turntable.pyi +++ b/stubs/vispy/scene/cameras/turntable.pyi @@ -4,9 +4,6 @@ from __future__ import division -import numpy as np - -from ...util import transforms from .perspective import Base3DRotationCamera class TurntableCamera(Base3DRotationCamera): diff --git a/stubs/vispy/scene/canvas.pyi b/stubs/vispy/scene/canvas.pyi index 9ce7edee..6a722331 100644 --- a/stubs/vispy/scene/canvas.pyi +++ b/stubs/vispy/scene/canvas.pyi @@ -1,10 +1,8 @@ -import weakref from typing import Mapping -import numpy as np from numpy.typing import ArrayLike -from .. import app, gloo +from .. import app from ..app.application import Application from ..app.canvas import Canvas, DrawEvent from ..color import Color @@ -12,15 +10,10 @@ from ..gloo.context import GLContext from ..gloo.framebuffer import FrameBuffer from ..scene.node import Node from ..scene.widgets.widget import Widget -from ..util import Frozen, logger +from ..util import Frozen from ..util.event import Event -from ..util.profiler import Profiler from ..util.svg.color import Color -from ..visuals.transforms import TransformSystem from ..visuals.visual import Visual -from .events import SceneMouseEvent -from .subscene import SubScene -from .visuals import VisualNode from .widgets import Widget # -*- coding: utf-8 -*- diff --git a/stubs/vispy/scene/node.pyi b/stubs/vispy/scene/node.pyi index 065ee566..91b69060 100644 --- a/stubs/vispy/scene/node.pyi +++ b/stubs/vispy/scene/node.pyi @@ -1,9 +1,8 @@ -import weakref from numpy.typing import ArrayLike -from ..util.event import EmitterGroup, Event -from ..visuals.transforms import BaseTransform, ChainTransform, NullTransform, TransformSystem, create_transform +from ..util.event import Event +from ..visuals.transforms import ChainTransform, TransformSystem from ..visuals.transforms.chain import ChainTransform from ..visuals.transforms.transform_system import TransformSystem diff --git a/stubs/vispy/scene/visuals.pyi b/stubs/vispy/scene/visuals.pyi index f021d8af..13845d00 100644 --- a/stubs/vispy/scene/visuals.pyi +++ b/stubs/vispy/scene/visuals.pyi @@ -1,13 +1,10 @@ # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -import re -import weakref -from typing import ClassVar, Type, TypeVar +from typing import TypeVar from .. import visuals from ..scene.node import Node -from ..visuals.filters import Alpha, PickingFilter from .node import Node _T = TypeVar("_T") diff --git a/stubs/vispy/scene/widgets/axis.pyi b/stubs/vispy/scene/widgets/axis.pyi index 0f25507d..44d4c9a9 100644 --- a/stubs/vispy/scene/widgets/axis.pyi +++ b/stubs/vispy/scene/widgets/axis.pyi @@ -3,10 +3,8 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -import numpy as np from ...util.event import Event -from ...visuals import AxisVisual from .viewbox import ViewBox from .widget import Widget diff --git a/stubs/vispy/scene/widgets/colorbar.pyi b/stubs/vispy/scene/widgets/colorbar.pyi index 579b3047..489222c0 100644 --- a/stubs/vispy/scene/widgets/colorbar.pyi +++ b/stubs/vispy/scene/widgets/colorbar.pyi @@ -1,10 +1,7 @@ from typing import Literal -import numpy as np - from ...color import Color, Colormap from ...util.event import Event -from ...visuals import ColorBarVisual from .widget import Widget # -*- coding: utf-8 -*- diff --git a/stubs/vispy/scene/widgets/console.pyi b/stubs/vispy/scene/widgets/console.pyi index da28f8dc..41f2b7bd 100644 --- a/stubs/vispy/scene/widgets/console.pyi +++ b/stubs/vispy/scene/widgets/console.pyi @@ -1,7 +1,5 @@ -import numpy as np from ...color import Color -from ...gloo import VertexBuffer from ...util.event import Event from ...util.svg.color import Color from ...visuals import Visual diff --git a/stubs/vispy/scene/widgets/grid.pyi b/stubs/vispy/scene/widgets/grid.pyi index e94bedc8..3fd13b76 100644 --- a/stubs/vispy/scene/widgets/grid.pyi +++ b/stubs/vispy/scene/widgets/grid.pyi @@ -1,7 +1,4 @@ -import numpy as np -from kiwisolver import Solver, UnsatisfiableConstraint, Variable -from .viewbox import ViewBox from .widget import Widget # -*- coding: utf-8 -*- diff --git a/stubs/vispy/scene/widgets/label.pyi b/stubs/vispy/scene/widgets/label.pyi index 29d8e182..a90edb71 100644 --- a/stubs/vispy/scene/widgets/label.pyi +++ b/stubs/vispy/scene/widgets/label.pyi @@ -1,5 +1,4 @@ from ...util.event import Event -from ...visuals import TextVisual from .widget import Widget # -*- coding: utf-8 -*- diff --git a/stubs/vispy/scene/widgets/viewbox.pyi b/stubs/vispy/scene/widgets/viewbox.pyi index b0fd86e0..60cbe61f 100644 --- a/stubs/vispy/scene/widgets/viewbox.pyi +++ b/stubs/vispy/scene/widgets/viewbox.pyi @@ -1,10 +1,7 @@ -import numpy as np from ...util.event import Event -from ...visuals.filters import Clipper -from ..cameras import BaseCamera, make_camera +from ..cameras import BaseCamera from ..node import Node -from ..subscene import SubScene from .widget import Widget # -*- coding: utf-8 -*- diff --git a/stubs/vispy/scene/widgets/widget.pyi b/stubs/vispy/scene/widgets/widget.pyi index 76975a53..6e4a9204 100644 --- a/stubs/vispy/scene/widgets/widget.pyi +++ b/stubs/vispy/scene/widgets/widget.pyi @@ -2,14 +2,7 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -import numpy as np -from ...color import Color -from ...geometry import Rect -from ...util.event import Event -from ...visuals.filters import Clipper -from ...visuals.mesh import MeshVisual -from ...visuals.transforms import STTransform from ..visuals import Compound class Widget(Compound): diff --git a/stubs/vispy/testing/_runners.pyi b/stubs/vispy/testing/_runners.pyi index 8535ebcb..11a5810a 100644 --- a/stubs/vispy/testing/_runners.pyi +++ b/stubs/vispy/testing/_runners.pyi @@ -1,15 +1,7 @@ -import os -import sys -import warnings -from copy import deepcopy -from functools import partial -from os import path as op from numpy.typing import ArrayLike -from ..util import run_subprocess, use_log_level -from ..util.ptime import time -from ._testing import IS_CI, IS_TRAVIS_CI, has_application, nottest +from ._testing import nottest # -*- coding: utf-8 -*- # vispy: testskip diff --git a/stubs/vispy/testing/_testing.pyi b/stubs/vispy/testing/_testing.pyi index fa7a4d5d..355ef1cb 100644 --- a/stubs/vispy/testing/_testing.pyi +++ b/stubs/vispy/testing/_testing.pyi @@ -6,17 +6,6 @@ from __future__ import print_function -import functools -import gc -import inspect -import os -import sys -from distutils.version import LooseVersion - -import numpy as np - -from ..util.check_environment import has_backend - skipif = ... IS_TRAVIS_CI = ... diff --git a/stubs/vispy/testing/image_tester.pyi b/stubs/vispy/testing/image_tester.pyi index 60394027..a118d3ef 100644 --- a/stubs/vispy/testing/image_tester.pyi +++ b/stubs/vispy/testing/image_tester.pyi @@ -1,21 +1,8 @@ -import base64 -import inspect -import os -import sys -import time -from http.client import HTTPConnection -from subprocess import CalledProcessError, check_call from typing import Literal -from urllib.parse import urlencode -import numpy as np from numpy.typing import NDArray -from .. import config, scene -from ..gloo.util import _screenshot -from ..io import read_png, write_png -from ..util import run_subprocess -from . import IS_CI +from .. import scene # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- diff --git a/stubs/vispy/testing/rendered_array_tester.pyi b/stubs/vispy/testing/rendered_array_tester.pyi index 0f34dd51..adcdf2e9 100644 --- a/stubs/vispy/testing/rendered_array_tester.pyi +++ b/stubs/vispy/testing/rendered_array_tester.pyi @@ -4,9 +4,8 @@ # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -from typing import Any, Optional +from typing import Optional -import numpy as np from numpy.typing import ArrayLike, DTypeLike def compare_render( diff --git a/stubs/vispy/util/check_environment.pyi b/stubs/vispy/util/check_environment.pyi index e0ad738b..eef2f579 100644 --- a/stubs/vispy/util/check_environment.pyi +++ b/stubs/vispy/util/check_environment.pyi @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -import os -from distutils.version import LooseVersion def has_matplotlib(version="1.2"): ... def has_skimage(version="0.11"): ... diff --git a/stubs/vispy/util/config.pyi b/stubs/vispy/util/config.pyi index e97b893a..b6d7afba 100644 --- a/stubs/vispy/util/config.pyi +++ b/stubs/vispy/util/config.pyi @@ -1,21 +1,6 @@ -import atexit -import getopt -import inspect -import io -import json -import os -import platform -import sys -import tempfile -import traceback -from os import path as op -from shutil import rmtree from typing import Mapping -import numpy as np - -from .event import EmitterGroup, Event, EventEmitter -from .logs import logger, set_log_level, use_log_level +from .event import Event # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. diff --git a/stubs/vispy/util/eq.pyi b/stubs/vispy/util/eq.pyi index 0f3887b0..3a559f74 100644 --- a/stubs/vispy/util/eq.pyi +++ b/stubs/vispy/util/eq.pyi @@ -1,4 +1,3 @@ # -*- coding: utf-8 -*- -from numpy import bool_, ndarray def eq(a, b): ... diff --git a/stubs/vispy/util/event.pyi b/stubs/vispy/util/event.pyi index 71fb6e2b..193a65ea 100644 --- a/stubs/vispy/util/event.pyi +++ b/stubs/vispy/util/event.pyi @@ -1,13 +1,7 @@ -import inspect -import traceback -import weakref -from collections import OrderedDict from typing import Any, Callable from numpy.typing import ArrayLike -from .logs import _handle_exception, logger - # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. diff --git a/stubs/vispy/util/fetching.pyi b/stubs/vispy/util/fetching.pyi index 5e57b0e1..b16dc58d 100644 --- a/stubs/vispy/util/fetching.pyi +++ b/stubs/vispy/util/fetching.pyi @@ -2,15 +2,7 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -import os -import shutil -import sys -import time -import urllib.request -from math import log -from os import path as op - -from ..util.config import config + ############################################################################### # Vispy data directory diff --git a/stubs/vispy/util/filter.pyi b/stubs/vispy/util/filter.pyi index a41ed505..2c815ff5 100644 --- a/stubs/vispy/util/filter.pyi +++ b/stubs/vispy/util/filter.pyi @@ -2,6 +2,5 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -import numpy as np def gaussian_filter(data, sigma): ... diff --git a/stubs/vispy/util/fonts/_quartz.pyi b/stubs/vispy/util/fonts/_quartz.pyi index 0384ce26..90630a39 100644 --- a/stubs/vispy/util/fonts/_quartz.pyi +++ b/stubs/vispy/util/fonts/_quartz.pyi @@ -6,29 +6,8 @@ # Use OSX cocoa/quartz to get glyph bitmaps -from ctypes import byref, c_byte, c_int32 -import numpy as np -from ...ext.cocoapy import ( - CFSTR, - CFRange, - CGGlyph, - ObjCClass, - UniChar, - cf, - ct, - kCFNumberSInt32Type, - kCGImageAlphaPremultipliedLast, - kCTFontAttributeName, - kCTFontBoldTrait, - kCTFontFamilyNameAttribute, - kCTFontItalicTrait, - kCTFontSymbolicTrait, - kCTFontTraitsAttribute, - quartz, -) -from ._vispy_fonts import _get_vispy_font_filename, _vispy_fonts _font_dict: dict = ... diff --git a/stubs/vispy/util/fonts/_triage.pyi b/stubs/vispy/util/fonts/_triage.pyi index ad372991..d95ad18b 100644 --- a/stubs/vispy/util/fonts/_triage.pyi +++ b/stubs/vispy/util/fonts/_triage.pyi @@ -1,9 +1,6 @@ -import sys from numpy.typing import ArrayLike -from ._vispy_fonts import _vispy_fonts - # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Vispy Development Team. All Rights Reserved. diff --git a/stubs/vispy/util/fonts/_vispy_fonts.pyi b/stubs/vispy/util/fonts/_vispy_fonts.pyi index efdf2973..0aa597e9 100644 --- a/stubs/vispy/util/fonts/_vispy_fonts.pyi +++ b/stubs/vispy/util/fonts/_vispy_fonts.pyi @@ -4,7 +4,6 @@ # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -import os.path as op # List the vispy fonts made available online _vispy_fonts = ... diff --git a/stubs/vispy/util/fourier.pyi b/stubs/vispy/util/fourier.pyi index 2b4117a3..5a4e893d 100644 --- a/stubs/vispy/util/fourier.pyi +++ b/stubs/vispy/util/fourier.pyi @@ -1,4 +1,3 @@ -import numpy as np from numpy.typing import ArrayLike, NDArray # -*- coding: utf-8 -*- diff --git a/stubs/vispy/util/logs.pyi b/stubs/vispy/util/logs.pyi index ce599c2e..207a042d 100644 --- a/stubs/vispy/util/logs.pyi +++ b/stubs/vispy/util/logs.pyi @@ -1,14 +1,5 @@ -import base64 -import inspect import json import logging -import re -import sys -import traceback -from functools import partial - -import numpy as np -from numpy.typing import ArrayLike # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. diff --git a/stubs/vispy/util/osmesa_gl.pyi b/stubs/vispy/util/osmesa_gl.pyi index 377fa9e8..6df4dcff 100644 --- a/stubs/vispy/util/osmesa_gl.pyi +++ b/stubs/vispy/util/osmesa_gl.pyi @@ -1,5 +1,3 @@ -import os -from . import logger def fix_osmesa_gl_lib(): ... diff --git a/stubs/vispy/util/profiler.pyi b/stubs/vispy/util/profiler.pyi index 27f05c8b..390ab569 100644 --- a/stubs/vispy/util/profiler.pyi +++ b/stubs/vispy/util/profiler.pyi @@ -2,10 +2,7 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # Adapted from PyQtGraph -import sys -from .. import config -from . import ptime class Profiler(object): _profilers = ... diff --git a/stubs/vispy/util/ptime.pyi b/stubs/vispy/util/ptime.pyi index 996a81d9..6e88118e 100644 --- a/stubs/vispy/util/ptime.pyi +++ b/stubs/vispy/util/ptime.pyi @@ -2,7 +2,6 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -import time as systime # get a reference starting time - initial performance counter START_TIME = ... diff --git a/stubs/vispy/util/quaternion.pyi b/stubs/vispy/util/quaternion.pyi index afc45445..4504b54b 100644 --- a/stubs/vispy/util/quaternion.pyi +++ b/stubs/vispy/util/quaternion.pyi @@ -3,7 +3,6 @@ # Distributed under the (new) BSD License. See LICENSE.txt for more info. # Based on the quaternion class in the visvis project. -import numpy as np class Quaternion(object): def __init__(self, w=1, x=0, y=0, z=0, normalize=True): ... diff --git a/stubs/vispy/util/svg/color.pyi b/stubs/vispy/util/svg/color.pyi index 80314b54..3937547d 100644 --- a/stubs/vispy/util/svg/color.pyi +++ b/stubs/vispy/util/svg/color.pyi @@ -4,8 +4,6 @@ # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -from itertools import product -from string import hexdigits # See _keyword_colors: dict = ... diff --git a/stubs/vispy/util/svg/element.pyi b/stubs/vispy/util/svg/element.pyi index 0437f374..eb02934e 100644 --- a/stubs/vispy/util/svg/element.pyi +++ b/stubs/vispy/util/svg/element.pyi @@ -3,9 +3,7 @@ # Copyright (c) 2014, Nicolas P. Rougier. All rights reserved. # Distributed under the terms of the new BSD License. # ----------------------------------------------------------------------------- -import copy -from .style import Style namespace: str = ... diff --git a/stubs/vispy/util/svg/geometry.pyi b/stubs/vispy/util/svg/geometry.pyi index be465aa8..46041a25 100644 --- a/stubs/vispy/util/svg/geometry.pyi +++ b/stubs/vispy/util/svg/geometry.pyi @@ -59,7 +59,6 @@ # policies, either expressed or implied, of Nicolas P. Rougier. # # ---------------------------------------------------------------------------- -import math curve_distance_epsilon: float = ... curve_collinearity_epsilon: float = ... diff --git a/stubs/vispy/util/svg/group.pyi b/stubs/vispy/util/svg/group.pyi index 5623487e..dae2b76d 100644 --- a/stubs/vispy/util/svg/group.pyi +++ b/stubs/vispy/util/svg/group.pyi @@ -4,11 +4,7 @@ # Distributed under the terms of the new BSD License. # ----------------------------------------------------------------------------- -import copy -from ...util import logger -from .base import namespace -from .path import Path from .transformable import Transformable class Group(Transformable): diff --git a/stubs/vispy/util/svg/length.pyi b/stubs/vispy/util/svg/length.pyi index 145d1332..59b77ea5 100644 --- a/stubs/vispy/util/svg/length.pyi +++ b/stubs/vispy/util/svg/length.pyi @@ -3,11 +3,7 @@ # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -import math -import re -from .. import logger -from .base import units class Length(object): def __init__(self, content, mode="x", parent=None): ... diff --git a/stubs/vispy/util/svg/path.pyi b/stubs/vispy/util/svg/path.pyi index 93ee2809..f57b42b8 100644 --- a/stubs/vispy/util/svg/path.pyi +++ b/stubs/vispy/util/svg/path.pyi @@ -3,13 +3,8 @@ # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -import math -import re -import numpy as np -from . import geometry -from .geometry import epsilon from .transformable import Transformable # ----------------------------------------------------------------- Command --- diff --git a/stubs/vispy/util/svg/style.pyi b/stubs/vispy/util/svg/style.pyi index b9c297a3..510abc33 100644 --- a/stubs/vispy/util/svg/style.pyi +++ b/stubs/vispy/util/svg/style.pyi @@ -4,9 +4,6 @@ # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -from .color import Color -from .length import Length -from .number import Number _converters: dict = ... diff --git a/stubs/vispy/util/svg/svg.pyi b/stubs/vispy/util/svg/svg.pyi index e9566ce7..308d4ac7 100644 --- a/stubs/vispy/util/svg/svg.pyi +++ b/stubs/vispy/util/svg/svg.pyi @@ -5,7 +5,6 @@ # ----------------------------------------------------------------------------- from .group import Group -from .viewport import Viewport class SVG(Group): def __init__(self, content=None, parent=None): ... diff --git a/stubs/vispy/util/svg/transform.pyi b/stubs/vispy/util/svg/transform.pyi index 94783416..56f1574a 100644 --- a/stubs/vispy/util/svg/transform.pyi +++ b/stubs/vispy/util/svg/transform.pyi @@ -3,10 +3,7 @@ # Copyright (c) 2014, Nicolas P. Rougier. All rights reserved. # Distributed under the terms of the new BSD License. # ----------------------------------------------------------------------------- -import math -import re -import numpy as np # ------------------------------------------------------------------ Matrix --- diff --git a/stubs/vispy/util/svg/transformable.pyi b/stubs/vispy/util/svg/transformable.pyi index e1efd5c6..f93327a3 100644 --- a/stubs/vispy/util/svg/transformable.pyi +++ b/stubs/vispy/util/svg/transformable.pyi @@ -4,7 +4,6 @@ # Distributed under the terms of the new BSD License. # ----------------------------------------------------------------------------- from .element import Element -from .transform import Transform class Transformable(Element): def __init__(self, content=None, parent=None): ... diff --git a/stubs/vispy/util/svg/viewport.pyi b/stubs/vispy/util/svg/viewport.pyi index c3e66124..5e177c32 100644 --- a/stubs/vispy/util/svg/viewport.pyi +++ b/stubs/vispy/util/svg/viewport.pyi @@ -4,7 +4,6 @@ # Distributed under the terms of the new BSD License. # ----------------------------------------------------------------------------- -from .length import XLength, YLength class Viewport(object): def __init__(self, content=None, parent=None): ... diff --git a/stubs/vispy/util/transforms.pyi b/stubs/vispy/util/transforms.pyi index 75eed8fd..7fe51675 100644 --- a/stubs/vispy/util/transforms.pyi +++ b/stubs/vispy/util/transforms.pyi @@ -1,7 +1,5 @@ -import math import numpy as np -from numpy import dtype from numpy.typing import ArrayLike, NDArray #!/usr/bin/env python diff --git a/stubs/vispy/util/wrappers.pyi b/stubs/vispy/util/wrappers.pyi index f2c83bb5..93873ea9 100644 --- a/stubs/vispy/util/wrappers.pyi +++ b/stubs/vispy/util/wrappers.pyi @@ -1,4 +1,3 @@ -import subprocess from numpy.typing import ArrayLike diff --git a/stubs/vispy/visuals/_scalable_textures.pyi b/stubs/vispy/visuals/_scalable_textures.pyi index 007d9d24..3e1372ff 100644 --- a/stubs/vispy/visuals/_scalable_textures.pyi +++ b/stubs/vispy/visuals/_scalable_textures.pyi @@ -1,10 +1,8 @@ # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -import warnings import numpy as np -from numpy import dtype from numpy.typing import NDArray from ..gloo import Texture2D, Texture3D diff --git a/stubs/vispy/visuals/axis.pyi b/stubs/vispy/visuals/axis.pyi index cbe864a5..1b4b1b00 100644 --- a/stubs/vispy/visuals/axis.pyi +++ b/stubs/vispy/visuals/axis.pyi @@ -1,12 +1,8 @@ -import math from collections.abc import Iterable -import numpy as np from numpy.typing import ArrayLike from ..util.svg.color import Color -from .line import LineVisual -from .text import TextVisual from .visual import CompoundVisual, updating_property # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/border.pyi b/stubs/vispy/visuals/border.pyi index e3ef0292..9069cd89 100644 --- a/stubs/vispy/visuals/border.pyi +++ b/stubs/vispy/visuals/border.pyi @@ -1,4 +1,3 @@ -import numpy as np from ..color import Color from . import Visual diff --git a/stubs/vispy/visuals/box.pyi b/stubs/vispy/visuals/box.pyi index 7944fa52..02f9ca34 100644 --- a/stubs/vispy/visuals/box.pyi +++ b/stubs/vispy/visuals/box.pyi @@ -1,8 +1,6 @@ from numpy.typing import ArrayLike, NDArray -from ..geometry import create_box from ..util.svg.color import Color -from .mesh import MeshVisual from .visual import CompoundVisual # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/collections/agg_fast_path_collection.pyi b/stubs/vispy/visuals/collections/agg_fast_path_collection.pyi index 591a19b7..987d0955 100644 --- a/stubs/vispy/visuals/collections/agg_fast_path_collection.pyi +++ b/stubs/vispy/visuals/collections/agg_fast_path_collection.pyi @@ -3,11 +3,8 @@ # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -import numpy as np from numpy.typing import ArrayLike, NDArray -from ... import gloo, glsl -from ..transforms import NullTransform from .collection import Collection class AggFastPathCollection(Collection): diff --git a/stubs/vispy/visuals/collections/agg_path_collection.pyi b/stubs/vispy/visuals/collections/agg_path_collection.pyi index 20c70519..da3ee801 100644 --- a/stubs/vispy/visuals/collections/agg_path_collection.pyi +++ b/stubs/vispy/visuals/collections/agg_path_collection.pyi @@ -3,12 +3,9 @@ # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -import numpy as np from numpy.typing import ArrayLike, NDArray -from ... import gloo, glsl from ...util.svg.transform import Transform -from ..transforms import NullTransform from .collection import Collection class AggPathCollection(Collection): diff --git a/stubs/vispy/visuals/collections/agg_point_collection.pyi b/stubs/vispy/visuals/collections/agg_point_collection.pyi index 8dafd944..acf66da9 100644 --- a/stubs/vispy/visuals/collections/agg_point_collection.pyi +++ b/stubs/vispy/visuals/collections/agg_point_collection.pyi @@ -5,7 +5,6 @@ from numpy.typing import ArrayLike # Copyright (c) 2014, Nicolas P. Rougier # 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 diff --git a/stubs/vispy/visuals/collections/agg_segment_collection.pyi b/stubs/vispy/visuals/collections/agg_segment_collection.pyi index 10f20a76..3ed41d46 100644 --- a/stubs/vispy/visuals/collections/agg_segment_collection.pyi +++ b/stubs/vispy/visuals/collections/agg_segment_collection.pyi @@ -3,11 +3,8 @@ # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -import numpy as np from numpy.typing import ArrayLike -from ... import glsl -from ..transforms import NullTransform from .collection import Collection class AggSegmentCollection(Collection): diff --git a/stubs/vispy/visuals/collections/base_collection.pyi b/stubs/vispy/visuals/collections/base_collection.pyi index 9ed817c6..90726539 100644 --- a/stubs/vispy/visuals/collections/base_collection.pyi +++ b/stubs/vispy/visuals/collections/base_collection.pyi @@ -1,12 +1,7 @@ -import math -import numpy as np from numpy.typing import ArrayLike, NDArray -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/collection.pyi b/stubs/vispy/visuals/collections/collection.pyi index edfb447f..a6ac5955 100644 --- a/stubs/vispy/visuals/collections/collection.pyi +++ b/stubs/vispy/visuals/collections/collection.pyi @@ -1,12 +1,7 @@ import numpy as np -from numpy import dtype from numpy.typing import ArrayLike -from ... import gloo -from ...util.event import EventEmitter -from ..shaders import ModularProgram from .base_collection import BaseCollection -from .util import fetchcode # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- diff --git a/stubs/vispy/visuals/collections/path_collection.pyi b/stubs/vispy/visuals/collections/path_collection.pyi index 9034efbf..9426f95e 100644 --- a/stubs/vispy/visuals/collections/path_collection.pyi +++ b/stubs/vispy/visuals/collections/path_collection.pyi @@ -3,8 +3,5 @@ # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -from .agg_fast_path_collection import AggFastPathCollection -from .agg_path_collection import AggPathCollection -from .raw_path_collection import RawPathCollection def PathCollection(mode="agg", *args, **kwargs): ... diff --git a/stubs/vispy/visuals/collections/point_collection.pyi b/stubs/vispy/visuals/collections/point_collection.pyi index e83fda59..3bb07eab 100644 --- a/stubs/vispy/visuals/collections/point_collection.pyi +++ b/stubs/vispy/visuals/collections/point_collection.pyi @@ -4,7 +4,5 @@ # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -from .agg_point_collection import AggPointCollection -from .raw_point_collection import RawPointCollection def PointCollection(mode="raw", *args, **kwargs): ... diff --git a/stubs/vispy/visuals/collections/polygon_collection.pyi b/stubs/vispy/visuals/collections/polygon_collection.pyi index 6d39df5c..a7159e99 100644 --- a/stubs/vispy/visuals/collections/polygon_collection.pyi +++ b/stubs/vispy/visuals/collections/polygon_collection.pyi @@ -3,7 +3,6 @@ # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -from .raw_polygon_collection import RawPolygonCollection # from . agg_polygon_collection import AggPolygonCollection # from . agg_fast_polygon_collection import AggPolygonCollection diff --git a/stubs/vispy/visuals/collections/raw_path_collection.pyi b/stubs/vispy/visuals/collections/raw_path_collection.pyi index 691b5721..0a027a63 100644 --- a/stubs/vispy/visuals/collections/raw_path_collection.pyi +++ b/stubs/vispy/visuals/collections/raw_path_collection.pyi @@ -3,12 +3,9 @@ # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -import numpy as np from numpy.typing import ArrayLike, NDArray -from ... import glsl from ...util.svg.transform import Transform -from ..transforms import NullTransform from .collection import Collection class RawPathCollection(Collection): diff --git a/stubs/vispy/visuals/collections/raw_point_collection.pyi b/stubs/vispy/visuals/collections/raw_point_collection.pyi index 8a141dda..a14e88a6 100644 --- a/stubs/vispy/visuals/collections/raw_point_collection.pyi +++ b/stubs/vispy/visuals/collections/raw_point_collection.pyi @@ -1,9 +1,6 @@ -import numpy as np from numpy.typing import ArrayLike, NDArray -from ... import glsl from ...util.svg.transform import Transform -from ..transforms import NullTransform from .collection import Collection # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/collections/raw_polygon_collection.pyi b/stubs/vispy/visuals/collections/raw_polygon_collection.pyi index 8c0a696a..7f72e45d 100644 --- a/stubs/vispy/visuals/collections/raw_polygon_collection.pyi +++ b/stubs/vispy/visuals/collections/raw_polygon_collection.pyi @@ -3,12 +3,8 @@ # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -import numpy as np from numpy.typing import NDArray -from ... import glsl -from ...geometry import triangulate -from ..transforms import NullTransform from .collection import Collection class RawPolygonCollection(Collection): diff --git a/stubs/vispy/visuals/collections/raw_segment_collection.pyi b/stubs/vispy/visuals/collections/raw_segment_collection.pyi index 4a627322..eea21cfb 100644 --- a/stubs/vispy/visuals/collections/raw_segment_collection.pyi +++ b/stubs/vispy/visuals/collections/raw_segment_collection.pyi @@ -3,11 +3,8 @@ # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -import numpy as np from numpy.typing import ArrayLike -from ... import glsl -from ..transforms import NullTransform from .collection import Collection class RawSegmentCollection(Collection): diff --git a/stubs/vispy/visuals/collections/raw_triangle_collection.pyi b/stubs/vispy/visuals/collections/raw_triangle_collection.pyi index af0a202d..f835d06e 100644 --- a/stubs/vispy/visuals/collections/raw_triangle_collection.pyi +++ b/stubs/vispy/visuals/collections/raw_triangle_collection.pyi @@ -3,11 +3,8 @@ # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -import numpy as np from numpy.typing import NDArray -from ... import glsl -from ..transforms import NullTransform from .collection import Collection class RawTriangleCollection(Collection): diff --git a/stubs/vispy/visuals/collections/segment_collection.pyi b/stubs/vispy/visuals/collections/segment_collection.pyi index d18ab3fd..9b2df67e 100644 --- a/stubs/vispy/visuals/collections/segment_collection.pyi +++ b/stubs/vispy/visuals/collections/segment_collection.pyi @@ -3,7 +3,5 @@ # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -from .agg_segment_collection import AggSegmentCollection -from .raw_segment_collection import RawSegmentCollection def SegmentCollection(mode="agg-fast", *args, **kwargs): ... diff --git a/stubs/vispy/visuals/collections/triangle_collection.pyi b/stubs/vispy/visuals/collections/triangle_collection.pyi index a8372dfa..d2218ca9 100644 --- a/stubs/vispy/visuals/collections/triangle_collection.pyi +++ b/stubs/vispy/visuals/collections/triangle_collection.pyi @@ -4,6 +4,5 @@ # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -from .raw_triangle_collection import RawTriangleCollection def TriangleCollection(mode="raw", *args, **kwargs): ... diff --git a/stubs/vispy/visuals/collections/util.pyi b/stubs/vispy/visuals/collections/util.pyi index 080cdace..1e19bc6a 100644 --- a/stubs/vispy/visuals/collections/util.pyi +++ b/stubs/vispy/visuals/collections/util.pyi @@ -5,10 +5,7 @@ # Distributed under the terms of the new BSD License. # ----------------------------------------------------------------------------- -from functools import reduce -from operator import mul -import numpy as np def dtype_reduce(dtype, level=0, depth=0): ... def fetchcode(utype, prefix=""): ... diff --git a/stubs/vispy/visuals/colorbar.pyi b/stubs/vispy/visuals/colorbar.pyi index 60ef8bb9..b4856f82 100644 --- a/stubs/vispy/visuals/colorbar.pyi +++ b/stubs/vispy/visuals/colorbar.pyi @@ -8,13 +8,9 @@ from functools import lru_cache -import numpy as np - -from ..color import get_colormap -from . import CompoundVisual, TextVisual, Visual, _BorderVisual +from . import CompoundVisual, Visual # from .border import _BorderVisual -from .shaders import Function _VERTEX_SHADER: str = ... # noqa diff --git a/stubs/vispy/visuals/cube.pyi b/stubs/vispy/visuals/cube.pyi index 4db2cebe..079ffd2c 100644 --- a/stubs/vispy/visuals/cube.pyi +++ b/stubs/vispy/visuals/cube.pyi @@ -1,4 +1,3 @@ -import warnings from numpy.typing import NDArray diff --git a/stubs/vispy/visuals/ellipse.pyi b/stubs/vispy/visuals/ellipse.pyi index 824e7ee9..63d3aa2e 100644 --- a/stubs/vispy/visuals/ellipse.pyi +++ b/stubs/vispy/visuals/ellipse.pyi @@ -1,4 +1,3 @@ -import numpy as np from numpy.typing import ArrayLike from ..util.svg.color import Color diff --git a/stubs/vispy/visuals/filters/base_filter.pyi b/stubs/vispy/visuals/filters/base_filter.pyi index b851522c..7f846c3d 100644 --- a/stubs/vispy/visuals/filters/base_filter.pyi +++ b/stubs/vispy/visuals/filters/base_filter.pyi @@ -1,7 +1,5 @@ from typing import Callable, Literal -from ..shaders import Function - # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. diff --git a/stubs/vispy/visuals/filters/clipper.pyi b/stubs/vispy/visuals/filters/clipper.pyi index 5c77cd1d..7a096b00 100644 --- a/stubs/vispy/visuals/filters/clipper.pyi +++ b/stubs/vispy/visuals/filters/clipper.pyi @@ -2,8 +2,6 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -from ...geometry import Rect -from ..transforms import NullTransform from .base_filter import Filter class Clipper(Filter): diff --git a/stubs/vispy/visuals/filters/clipping_planes.pyi b/stubs/vispy/visuals/filters/clipping_planes.pyi index 23ac120a..574866aa 100644 --- a/stubs/vispy/visuals/filters/clipping_planes.pyi +++ b/stubs/vispy/visuals/filters/clipping_planes.pyi @@ -9,7 +9,6 @@ from typing import Optional import numpy as np -from ..shaders import Function, Varying from .base_filter import Filter class PlanesClipper(Filter): diff --git a/stubs/vispy/visuals/filters/color.pyi b/stubs/vispy/visuals/filters/color.pyi index b825d6b0..3166f416 100644 --- a/stubs/vispy/visuals/filters/color.pyi +++ b/stubs/vispy/visuals/filters/color.pyi @@ -2,8 +2,6 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -from ...color import Color, colormap -from ..shaders import Function, Varying from .base_filter import Filter class IsolineFilter(Filter): diff --git a/stubs/vispy/visuals/filters/mesh.pyi b/stubs/vispy/visuals/filters/mesh.pyi index 8069f88a..e5bec658 100644 --- a/stubs/vispy/visuals/filters/mesh.pyi +++ b/stubs/vispy/visuals/filters/mesh.pyi @@ -1,9 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -import numbers -import numpy as np from numpy.typing import ArrayLike from ...color import Color diff --git a/stubs/vispy/visuals/filters/picking.pyi b/stubs/vispy/visuals/filters/picking.pyi index 9b067cc5..3cde3c8d 100644 --- a/stubs/vispy/visuals/filters/picking.pyi +++ b/stubs/vispy/visuals/filters/picking.pyi @@ -2,7 +2,6 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -import struct from .base_filter import Filter diff --git a/stubs/vispy/visuals/graphs/graph.pyi b/stubs/vispy/visuals/graphs/graph.pyi index 89f53816..415b095f 100644 --- a/stubs/vispy/visuals/graphs/graph.pyi +++ b/stubs/vispy/visuals/graphs/graph.pyi @@ -1,10 +1,7 @@ from numpy.typing import ArrayLike, NDArray from ...color import Colormap -from ..line import ArrowVisual -from ..markers import MarkersVisual from ..visual import CompoundVisual -from . import layouts # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. diff --git a/stubs/vispy/visuals/graphs/layouts/circular.pyi b/stubs/vispy/visuals/graphs/layouts/circular.pyi index 35fc693f..96d7fb1a 100644 --- a/stubs/vispy/visuals/graphs/layouts/circular.pyi +++ b/stubs/vispy/visuals/graphs/layouts/circular.pyi @@ -1,4 +1,3 @@ -import numpy as np from numpy.typing import ArrayLike, NDArray # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/graphs/layouts/force_directed.pyi b/stubs/vispy/visuals/graphs/layouts/force_directed.pyi index 2e33cd2a..09f58cc9 100644 --- a/stubs/vispy/visuals/graphs/layouts/force_directed.pyi +++ b/stubs/vispy/visuals/graphs/layouts/force_directed.pyi @@ -1,8 +1,5 @@ -import numpy as np from numpy.typing import ArrayLike -from ..util import _rescale_layout, _straight_line_vertices - # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. diff --git a/stubs/vispy/visuals/graphs/layouts/networkx_layout.pyi b/stubs/vispy/visuals/graphs/layouts/networkx_layout.pyi index fe859db7..3154ef95 100644 --- a/stubs/vispy/visuals/graphs/layouts/networkx_layout.pyi +++ b/stubs/vispy/visuals/graphs/layouts/networkx_layout.pyi @@ -5,7 +5,6 @@ import numpy as np # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info.#!/usr/bin/env python3 -from ..util import _straight_line_vertices class NetworkxCoordinates: def __init__(self, graph=None, layout: str | dict | Iterable[np.float32] | None = None, **kwargs: Mapping): ... diff --git a/stubs/vispy/visuals/graphs/layouts/random.pyi b/stubs/vispy/visuals/graphs/layouts/random.pyi index c3eb306f..a28aac8b 100644 --- a/stubs/vispy/visuals/graphs/layouts/random.pyi +++ b/stubs/vispy/visuals/graphs/layouts/random.pyi @@ -1,9 +1,6 @@ -import numpy as np from numpy.random import RandomState from numpy.typing import ArrayLike, NDArray -from ..util import _straight_line_vertices - # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. diff --git a/stubs/vispy/visuals/graphs/util.pyi b/stubs/vispy/visuals/graphs/util.pyi index 6df6b597..64844116 100644 --- a/stubs/vispy/visuals/graphs/util.pyi +++ b/stubs/vispy/visuals/graphs/util.pyi @@ -2,7 +2,6 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -import numpy as np def _get_edges(adjacency_mat): ... def _sparse_get_edges(adjacency_mat): ... diff --git a/stubs/vispy/visuals/gridlines.pyi b/stubs/vispy/visuals/gridlines.pyi index 7798987d..195bdefe 100644 --- a/stubs/vispy/visuals/gridlines.pyi +++ b/stubs/vispy/visuals/gridlines.pyi @@ -1,7 +1,6 @@ from ..color import Color from ..util.svg.color import Color from .image import ImageVisual -from .shaders import Function # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. diff --git a/stubs/vispy/visuals/gridmesh.pyi b/stubs/vispy/visuals/gridmesh.pyi index 3ad1bc6f..d76d8c58 100644 --- a/stubs/vispy/visuals/gridmesh.pyi +++ b/stubs/vispy/visuals/gridmesh.pyi @@ -1,6 +1,5 @@ from numpy.typing import NDArray -from ..geometry import MeshData, create_grid_mesh from .mesh import MeshVisual class GridMeshVisual(MeshVisual): diff --git a/stubs/vispy/visuals/histogram.pyi b/stubs/vispy/visuals/histogram.pyi index 2c56e8fc..904fe1f5 100644 --- a/stubs/vispy/visuals/histogram.pyi +++ b/stubs/vispy/visuals/histogram.pyi @@ -1,6 +1,5 @@ from typing import Literal -import numpy as np from numpy.typing import ArrayLike from ..util.svg.color import Color diff --git a/stubs/vispy/visuals/image.pyi b/stubs/vispy/visuals/image.pyi index 9ac23430..a7d08916 100644 --- a/stubs/vispy/visuals/image.pyi +++ b/stubs/vispy/visuals/image.pyi @@ -1,14 +1,7 @@ import numpy as np -from numpy import dtype from numpy.typing import ArrayLike, NDArray -from ..color import Colormap, get_colormap -from ..gloo import Texture2D, VertexBuffer -from ..gloo.texture import should_cast_to_f32 -from ..io import load_spatial_filters -from ._scalable_textures import CPUScaledTexture2D, GPUScaledTexture2D -from .shaders import Function, FunctionChain -from .transforms import NullTransform +from ..color import Colormap from .visual import Visual # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/image_complex.pyi b/stubs/vispy/visuals/image_complex.pyi index 59857d22..5fb510bd 100644 --- a/stubs/vispy/visuals/image_complex.pyi +++ b/stubs/vispy/visuals/image_complex.pyi @@ -1,8 +1,6 @@ -import numpy as np from numpy.typing import ArrayLike, NDArray -from .image import _APPLY_CLIM_FLOAT, _APPLY_GAMMA_FLOAT, ImageVisual -from .shaders import Function, FunctionChain +from .image import ImageVisual # In a complex Image, the texture will be rg32f, where: # data.r contains the real component diff --git a/stubs/vispy/visuals/infinite_line.pyi b/stubs/vispy/visuals/infinite_line.pyi index d6a7873c..c440c007 100644 --- a/stubs/vispy/visuals/infinite_line.pyi +++ b/stubs/vispy/visuals/infinite_line.pyi @@ -1,7 +1,5 @@ -import numpy as np from numpy.typing import ArrayLike -from .. import gloo from .visual import Visual _VERTEX_SHADER: str = ... diff --git a/stubs/vispy/visuals/isocurve.pyi b/stubs/vispy/visuals/isocurve.pyi index a1c3b91b..4c96080f 100644 --- a/stubs/vispy/visuals/isocurve.pyi +++ b/stubs/vispy/visuals/isocurve.pyi @@ -1,10 +1,7 @@ import numpy as np from numpy.typing import NDArray -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 # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/isoline.pyi b/stubs/vispy/visuals/isoline.pyi index 85ec6609..e3c21255 100644 --- a/stubs/vispy/visuals/isoline.pyi +++ b/stubs/vispy/visuals/isoline.pyi @@ -1,10 +1,7 @@ import numpy as np -from numpy import ndarray from numpy.typing import NDArray 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 diff --git a/stubs/vispy/visuals/isosurface.pyi b/stubs/vispy/visuals/isosurface.pyi index 395ccb93..12294a27 100644 --- a/stubs/vispy/visuals/isosurface.pyi +++ b/stubs/vispy/visuals/isosurface.pyi @@ -3,7 +3,6 @@ from __future__ import division from numpy.typing import ArrayLike, NDArray from ..color import Color -from ..geometry.isosurface import isosurface from ..util.svg.color import Color from .mesh import MeshVisual diff --git a/stubs/vispy/visuals/line/arrow.pyi b/stubs/vispy/visuals/line/arrow.pyi index adc4e073..3b54e546 100644 --- a/stubs/vispy/visuals/line/arrow.pyi +++ b/stubs/vispy/visuals/line/arrow.pyi @@ -1,9 +1,6 @@ -import numpy as np from numpy.typing import ArrayLike -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/dash_atlas.pyi b/stubs/vispy/visuals/line/dash_atlas.pyi index a61e56ae..ddd3a711 100644 --- a/stubs/vispy/visuals/line/dash_atlas.pyi +++ b/stubs/vispy/visuals/line/dash_atlas.pyi @@ -2,7 +2,6 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -import numpy as np class DashAtlas(object): def __init__(self, shape=...): ... diff --git a/stubs/vispy/visuals/line/line.pyi b/stubs/vispy/visuals/line/line.pyi index a6a7d223..5b8d9453 100644 --- a/stubs/vispy/visuals/line/line.pyi +++ b/stubs/vispy/visuals/line/line.pyi @@ -1,14 +1,9 @@ from functools import lru_cache -import numpy as np from numpy.typing import ArrayLike -from ... import gloo, glsl -from ...color import Color, ColorArray, get_colormap -from ...util.profiler import Profiler -from ..shaders import Function +from ...color import Color from ..visual import CompoundVisual, Visual -from .dash_atlas import DashAtlas # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. diff --git a/stubs/vispy/visuals/line_plot.pyi b/stubs/vispy/visuals/line_plot.pyi index 46520359..f25702ab 100644 --- a/stubs/vispy/visuals/line_plot.pyi +++ b/stubs/vispy/visuals/line_plot.pyi @@ -1,9 +1,6 @@ -import numpy as np from numpy.typing import ArrayLike from ..util.svg.color import Color -from .line import LineVisual -from .markers import MarkersVisual from .visual import CompoundVisual # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/linear_region.pyi b/stubs/vispy/visuals/linear_region.pyi index aaee58ec..d9f9c7c9 100644 --- a/stubs/vispy/visuals/linear_region.pyi +++ b/stubs/vispy/visuals/linear_region.pyi @@ -1,7 +1,5 @@ -import numpy as np from numpy.typing import ArrayLike, NDArray -from .. import gloo from .visual import Visual _VERTEX_SHADER: str = ... diff --git a/stubs/vispy/visuals/markers.pyi b/stubs/vispy/visuals/markers.pyi index 04248973..b7a55d55 100644 --- a/stubs/vispy/visuals/markers.pyi +++ b/stubs/vispy/visuals/markers.pyi @@ -1,12 +1,8 @@ -import warnings -import numpy as np from numpy.typing import ArrayLike 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 # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/mesh.pyi b/stubs/vispy/visuals/mesh.pyi index 89e3ab38..325b1c46 100644 --- a/stubs/vispy/visuals/mesh.pyi +++ b/stubs/vispy/visuals/mesh.pyi @@ -2,17 +2,12 @@ from __future__ import division from functools import lru_cache -import numpy as np from numpy.typing import ArrayLike -from ..color import Color, get_colormap -from ..color.colormap import CubeHelixColormap +from ..color import Color 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 # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/mesh_normals.pyi b/stubs/vispy/visuals/mesh_normals.pyi index 42201b58..5e4976a3 100644 --- a/stubs/vispy/visuals/mesh_normals.pyi +++ b/stubs/vispy/visuals/mesh_normals.pyi @@ -1,6 +1,5 @@ from typing import Literal -import numpy as np from numpy.typing import ArrayLike from . import LineVisual diff --git a/stubs/vispy/visuals/plane.pyi b/stubs/vispy/visuals/plane.pyi index 085cb710..c171f26c 100644 --- a/stubs/vispy/visuals/plane.pyi +++ b/stubs/vispy/visuals/plane.pyi @@ -1,8 +1,6 @@ from numpy.typing import NDArray -from ..geometry import create_plane from ..util.svg.color import Color -from .mesh import MeshVisual from .visual import CompoundVisual # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/polygon.pyi b/stubs/vispy/visuals/polygon.pyi index bb3979ba..27e29069 100644 --- a/stubs/vispy/visuals/polygon.pyi +++ b/stubs/vispy/visuals/polygon.pyi @@ -1,12 +1,7 @@ from typing import Sequence -import numpy as np from numpy.typing import ArrayLike -from ..color import Color -from ..geometry import PolygonData -from .line import LineVisual -from .mesh import MeshVisual from .visual import CompoundVisual # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/rectangle.pyi b/stubs/vispy/visuals/rectangle.pyi index 5673eb09..829b53f5 100644 --- a/stubs/vispy/visuals/rectangle.pyi +++ b/stubs/vispy/visuals/rectangle.pyi @@ -1,4 +1,3 @@ -import numpy as np from numpy.typing import ArrayLike from ..color import Color diff --git a/stubs/vispy/visuals/scrolling_lines.pyi b/stubs/vispy/visuals/scrolling_lines.pyi index 4d0ebe92..63c9548e 100644 --- a/stubs/vispy/visuals/scrolling_lines.pyi +++ b/stubs/vispy/visuals/scrolling_lines.pyi @@ -3,10 +3,8 @@ # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- -import numpy as np from numpy.typing import ArrayLike -from .. import gloo from .visual import Visual class ScrollingLinesVisual(Visual): diff --git a/stubs/vispy/visuals/shaders/compiler.pyi b/stubs/vispy/visuals/shaders/compiler.pyi index d4a26089..6456f89d 100644 --- a/stubs/vispy/visuals/shaders/compiler.pyi +++ b/stubs/vispy/visuals/shaders/compiler.pyi @@ -4,8 +4,6 @@ from __future__ import division -from ... import gloo - class Compiler(object): def __init__(self, namespace=None, **shaders): ... def __getitem__(self, item): ... diff --git a/stubs/vispy/visuals/shaders/function.pyi b/stubs/vispy/visuals/shaders/function.pyi index 0e7729b8..aa5c9dd9 100644 --- a/stubs/vispy/visuals/shaders/function.pyi +++ b/stubs/vispy/visuals/shaders/function.pyi @@ -1,16 +1,7 @@ -import logging -import re -from collections import OrderedDict -import numpy as np from numpy.typing import ArrayLike -from ...util import logger -from ...util.eq import eq -from . import parsing -from .expression import FunctionCall, TextExpression from .shader_object import ShaderObject -from .variable import Variable, Varying # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. diff --git a/stubs/vispy/visuals/shaders/multiprogram.pyi b/stubs/vispy/visuals/shaders/multiprogram.pyi index e83bbedf..0694cd70 100644 --- a/stubs/vispy/visuals/shaders/multiprogram.pyi +++ b/stubs/vispy/visuals/shaders/multiprogram.pyi @@ -1,6 +1,4 @@ -import weakref -from .program import ModularProgram class MultiProgram(object): def __init__(self, vcode="", fcode="", gcode=None): ... diff --git a/stubs/vispy/visuals/shaders/parsing.pyi b/stubs/vispy/visuals/shaders/parsing.pyi index 6f0a2316..6b2e08c6 100644 --- a/stubs/vispy/visuals/shaders/parsing.pyi +++ b/stubs/vispy/visuals/shaders/parsing.pyi @@ -4,8 +4,6 @@ from __future__ import division -import re - # regular expressions for parsing GLSL re_version_pragma: str = ... diff --git a/stubs/vispy/visuals/shaders/program.pyi b/stubs/vispy/visuals/shaders/program.pyi index fbc47800..04b565a5 100644 --- a/stubs/vispy/visuals/shaders/program.pyi +++ b/stubs/vispy/visuals/shaders/program.pyi @@ -4,16 +4,7 @@ from __future__ import division -import logging -from weakref import WeakKeyDictionary - from ...gloo import Program -from ...gloo.preprocessor import preprocess -from ...util import logger -from ...util.event import EventEmitter -from .compiler import Compiler -from .function import MainFunction -from .variable import Variable class ModularProgram(Program): def __init__(self, vcode="", fcode="", gcode=None): ... diff --git a/stubs/vispy/visuals/shaders/shader_object.pyi b/stubs/vispy/visuals/shaders/shader_object.pyi index 85171ee8..5af98253 100644 --- a/stubs/vispy/visuals/shaders/shader_object.pyi +++ b/stubs/vispy/visuals/shaders/shader_object.pyi @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -from collections import OrderedDict -from weakref import WeakKeyDictionary -from .compiler import Compiler class ShaderObject(object): @classmethod diff --git a/stubs/vispy/visuals/shaders/variable.pyi b/stubs/vispy/visuals/shaders/variable.pyi index bc863c91..790c9b5f 100644 --- a/stubs/vispy/visuals/shaders/variable.pyi +++ b/stubs/vispy/visuals/shaders/variable.pyi @@ -3,8 +3,6 @@ from typing import Literal # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. -import numpy as np - from ...gloo.globject import GLObject from .shader_object import ShaderObject diff --git a/stubs/vispy/visuals/spectrogram.pyi b/stubs/vispy/visuals/spectrogram.pyi index 6b9cbe53..706b83d2 100644 --- a/stubs/vispy/visuals/spectrogram.pyi +++ b/stubs/vispy/visuals/spectrogram.pyi @@ -1,9 +1,7 @@ from typing import Literal -import numpy as np from numpy.typing import ArrayLike -from ..util.fourier import fft_freqs, stft from .image import ImageVisual # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/sphere.pyi b/stubs/vispy/visuals/sphere.pyi index 44275fe4..409574d0 100644 --- a/stubs/vispy/visuals/sphere.pyi +++ b/stubs/vispy/visuals/sphere.pyi @@ -1,8 +1,6 @@ from numpy.typing import NDArray -from ..geometry import create_sphere from ..util.svg.color import Color -from .mesh import MeshVisual from .visual import CompoundVisual # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/surface_plot.pyi b/stubs/vispy/visuals/surface_plot.pyi index bc9e540b..e563ed07 100644 --- a/stubs/vispy/visuals/surface_plot.pyi +++ b/stubs/vispy/visuals/surface_plot.pyi @@ -1,9 +1,7 @@ from __future__ import division -import numpy as np from numpy.typing import NDArray -from ..geometry import MeshData from .mesh import MeshVisual # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/text/_sdf_gpu.pyi b/stubs/vispy/visuals/text/_sdf_gpu.pyi index ff77cc24..c87a2392 100644 --- a/stubs/vispy/visuals/text/_sdf_gpu.pyi +++ b/stubs/vispy/visuals/text/_sdf_gpu.pyi @@ -1,4 +1,3 @@ -import numpy as np from numpy.typing import ArrayLike from ...gloo import Texture2D diff --git a/stubs/vispy/visuals/text/text.pyi b/stubs/vispy/visuals/text/text.pyi index cd92f783..1f335808 100644 --- a/stubs/vispy/visuals/text/text.pyi +++ b/stubs/vispy/visuals/text/text.pyi @@ -1,16 +1,8 @@ -import sys -from copy import deepcopy from typing import Any, Mapping -import numpy as np from numpy.typing import ArrayLike -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/_util.pyi b/stubs/vispy/visuals/transforms/_util.pyi index b4446b4f..2a2d8a07 100644 --- a/stubs/vispy/visuals/transforms/_util.pyi +++ b/stubs/vispy/visuals/transforms/_util.pyi @@ -1,12 +1,7 @@ -import functools -from functools import wraps from typing import Callable -import numpy as np from numpy.typing import ArrayLike -from ...util import logger - # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. diff --git a/stubs/vispy/visuals/transforms/base_transform.pyi b/stubs/vispy/visuals/transforms/base_transform.pyi index 78559d4b..f18feee3 100644 --- a/stubs/vispy/visuals/transforms/base_transform.pyi +++ b/stubs/vispy/visuals/transforms/base_transform.pyi @@ -4,9 +4,6 @@ from __future__ import division -from ...util.event import EventEmitter -from ..shaders import Function - class BaseTransform(object): glsl_map: None = ... # Must be GLSL code glsl_imap: None = ... diff --git a/stubs/vispy/visuals/transforms/chain.pyi b/stubs/vispy/visuals/transforms/chain.pyi index feb93fd0..1cbf138c 100644 --- a/stubs/vispy/visuals/transforms/chain.pyi +++ b/stubs/vispy/visuals/transforms/chain.pyi @@ -3,9 +3,7 @@ from typing import Sequence from numpy.typing import ArrayLike, NDArray from ...util.svg.transform import Transform -from ..shaders import FunctionChain from .base_transform import BaseTransform -from .linear import NullTransform # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. diff --git a/stubs/vispy/visuals/transforms/interactive.pyi b/stubs/vispy/visuals/transforms/interactive.pyi index 4c4ce8a6..fec2aa68 100644 --- a/stubs/vispy/visuals/transforms/interactive.pyi +++ b/stubs/vispy/visuals/transforms/interactive.pyi @@ -1,4 +1,3 @@ -import numpy as np from ...app.canvas import Canvas from ...util.event import Event diff --git a/stubs/vispy/visuals/transforms/linear.pyi b/stubs/vispy/visuals/transforms/linear.pyi index 04c5a5c2..a343b84b 100644 --- a/stubs/vispy/visuals/transforms/linear.pyi +++ b/stubs/vispy/visuals/transforms/linear.pyi @@ -1,10 +1,7 @@ import numpy as np -from numpy import ndarray from numpy.typing import ArrayLike, NDArray -from ...geometry import Rect -from ...util import transforms -from ._util import arg_to_vec4, as_vec4 +from ._util import arg_to_vec4 from .base_transform import BaseTransform # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/transforms/nonlinear.pyi b/stubs/vispy/visuals/transforms/nonlinear.pyi index ee9e4b8f..e33e2fcf 100644 --- a/stubs/vispy/visuals/transforms/nonlinear.pyi +++ b/stubs/vispy/visuals/transforms/nonlinear.pyi @@ -1,8 +1,6 @@ -import numpy as np from numpy.typing import ArrayLike -from ... import gloo -from ._util import arg_to_array, arg_to_vec4, as_vec4 +from ._util import arg_to_array, arg_to_vec4 from .base_transform import BaseTransform # -*- coding: utf-8 -*- diff --git a/stubs/vispy/visuals/transforms/transform_system.pyi b/stubs/vispy/visuals/transforms/transform_system.pyi index 98155b57..b92276d8 100644 --- a/stubs/vispy/visuals/transforms/transform_system.pyi +++ b/stubs/vispy/visuals/transforms/transform_system.pyi @@ -1,12 +1,6 @@ from __future__ import division -import numpy as np - from ...app.canvas import Canvas -from ...util.event import EventEmitter -from ._util import TransformCache -from .chain import ChainTransform -from .linear import NullTransform, STTransform # -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. diff --git a/stubs/vispy/visuals/tube.pyi b/stubs/vispy/visuals/tube.pyi index ff29dbcc..d701af69 100644 --- a/stubs/vispy/visuals/tube.pyi +++ b/stubs/vispy/visuals/tube.pyi @@ -1,13 +1,9 @@ -import collections -import numpy as np -from numpy.linalg import norm from numpy.typing import NDArray 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 class TubeVisual(MeshVisual): diff --git a/stubs/vispy/visuals/visual.pyi b/stubs/vispy/visuals/visual.pyi index 9a79ff4d..8782abef 100644 --- a/stubs/vispy/visuals/visual.pyi +++ b/stubs/vispy/visuals/visual.pyi @@ -4,17 +4,10 @@ from __future__ import division -import weakref from typing import Any, Sequence -import numpy as np - -from .. import gloo from ..gloo.program import Program -from ..util import Frozen, logger -from ..util.event import EmitterGroup, Event -from .shaders import MultiProgram, StatementList -from .transforms import TransformSystem +from ..util import Frozen class VisualShare(object): def __init__(self): ... diff --git a/stubs/vispy/visuals/volume.pyi b/stubs/vispy/visuals/volume.pyi index 9c6aa6f5..69aaaf1c 100644 --- a/stubs/vispy/visuals/volume.pyi +++ b/stubs/vispy/visuals/volume.pyi @@ -10,13 +10,7 @@ from typing import Literal, Optional import numpy as np from numpy.typing import ArrayLike, NDArray -from ..color import get_colormap -from ..gloo import IndexBuffer, VertexBuffer -from ..gloo.texture import should_cast_to_f32 -from ..io import load_spatial_filters from . import Visual -from ._scalable_textures import CPUScaledTexture3D, GPUScaledTextured3D, Texture2D -from .shaders import Function # todo: implement more render methods (port from visvis) # todo: allow anisotropic data diff --git a/stubs/vispy/visuals/windbarb.pyi b/stubs/vispy/visuals/windbarb.pyi index db2e65ea..7c504257 100644 --- a/stubs/vispy/visuals/windbarb.pyi +++ b/stubs/vispy/visuals/windbarb.pyi @@ -1,4 +1,3 @@ -import numpy as np from numpy.typing import ArrayLike from ..color import ColorArray diff --git a/stubs/vispy/visuals/xyz_axis.pyi b/stubs/vispy/visuals/xyz_axis.pyi index a4f298b6..fac8a959 100644 --- a/stubs/vispy/visuals/xyz_axis.pyi +++ b/stubs/vispy/visuals/xyz_axis.pyi @@ -1,4 +1,3 @@ -import numpy as np from .line import LineVisual