From 4b5e235d1cc20a2793bbe128c19d538a377474fa Mon Sep 17 00:00:00 2001 From: Avasam Date: Thu, 8 May 2025 22:25:25 -0400 Subject: [PATCH] networkx: add all missing `__all__` (#13956) --- .../algorithms/approximation/clique.pyi | 2 + .../approximation/clustering_coefficient.pyi | 2 + .../algorithms/approximation/connectivity.pyi | 2 + .../approximation/distance_measures.pyi | 2 + .../approximation/dominating_set.pyi | 2 + .../algorithms/approximation/kcomponents.pyi | 2 + .../algorithms/approximation/matching.pyi | 2 + .../algorithms/approximation/maxcut.pyi | 2 + .../algorithms/approximation/ramsey.pyi | 2 + .../algorithms/approximation/steinertree.pyi | 2 + .../approximation/traveling_salesman.pyi | 9 +++++ .../algorithms/approximation/vertex_cover.pyi | 2 + .../algorithms/assortativity/connectivity.pyi | 2 + .../algorithms/assortativity/correlation.pyi | 7 ++++ .../algorithms/assortativity/mixing.pyi | 2 + .../assortativity/neighbor_degree.pyi | 2 + .../algorithms/assortativity/pairs.pyi | 2 + .../networkx/algorithms/asteroidal.pyi | 2 + .../networkx/algorithms/bipartite/basic.pyi | 2 + .../algorithms/bipartite/centrality.pyi | 2 + .../networkx/algorithms/bipartite/cluster.pyi | 2 + .../algorithms/bipartite/covering.pyi | 2 + .../algorithms/bipartite/edgelist.pyi | 2 + .../algorithms/bipartite/extendability.pyi | 2 + .../algorithms/bipartite/generators.pyi | 11 ++++++ .../algorithms/bipartite/matching.pyi | 2 + .../networkx/algorithms/bipartite/matrix.pyi | 2 + .../algorithms/bipartite/projection.pyi | 8 ++++ .../algorithms/bipartite/redundancy.pyi | 2 + .../algorithms/bipartite/spectral.pyi | 2 + .../networkx/networkx/algorithms/boundary.pyi | 1 + .../networkx/networkx/algorithms/bridges.pyi | 2 + .../algorithms/centrality/betweenness.pyi | 2 + .../centrality/betweenness_subset.pyi | 2 + .../algorithms/centrality/closeness.pyi | 2 + .../centrality/current_flow_betweenness.pyi | 6 +++ .../current_flow_betweenness_subset.pyi | 2 + .../centrality/current_flow_closeness.pyi | 2 + .../algorithms/centrality/degree_alg.pyi | 2 + .../algorithms/centrality/dispersion.pyi | 2 + .../algorithms/centrality/eigenvector.pyi | 2 + .../networkx/algorithms/centrality/group.pyi | 9 +++++ .../algorithms/centrality/harmonic.pyi | 2 + .../networkx/algorithms/centrality/katz.pyi | 2 + .../algorithms/centrality/laplacian.pyi | 2 + .../algorithms/centrality/percolation.pyi | 2 + .../algorithms/centrality/reaching.pyi | 2 + .../algorithms/centrality/second_order.pyi | 2 + .../algorithms/centrality/subgraph_alg.pyi | 2 + .../algorithms/centrality/trophic.pyi | 2 + .../algorithms/centrality/voterank_alg.pyi | 2 + stubs/networkx/networkx/algorithms/chains.pyi | 2 + .../networkx/networkx/algorithms/chordal.pyi | 12 ++++++ stubs/networkx/networkx/algorithms/clique.pyi | 14 +++++++ .../networkx/networkx/algorithms/cluster.pyi | 2 + .../coloring/equitable_coloring.pyi | 2 + .../algorithms/communicability_alg.pyi | 2 + .../algorithms/community/asyn_fluid.pyi | 2 + .../algorithms/community/centrality.pyi | 2 + .../algorithms/community/community_utils.pyi | 2 + .../networkx/algorithms/community/kclique.pyi | 2 + .../algorithms/community/kernighan_lin.pyi | 2 + .../community/label_propagation.pyi | 4 ++ .../networkx/algorithms/community/louvain.pyi | 2 + .../networkx/algorithms/community/lukes.pyi | 2 + .../algorithms/community/modularity_max.pyi | 2 + .../algorithms/components/attracting.pyi | 2 + .../algorithms/components/biconnected.pyi | 2 + .../algorithms/components/connected.pyi | 2 + .../algorithms/components/semiconnected.pyi | 2 + .../components/strongly_connected.pyi | 8 ++++ .../components/weakly_connected.pyi | 2 + .../connectivity/edge_augmentation.pyi | 2 + .../connectivity/edge_kcomponents.pyi | 2 + .../algorithms/connectivity/stoerwagner.pyi | 2 + .../algorithms/connectivity/utils.pyi | 2 + stubs/networkx/networkx/algorithms/core.pyi | 2 + .../networkx/networkx/algorithms/covering.pyi | 2 + stubs/networkx/networkx/algorithms/cuts.pyi | 11 ++++++ stubs/networkx/networkx/algorithms/cycles.pyi | 12 ++++++ .../networkx/algorithms/d_separation.pyi | 8 ++++ stubs/networkx/networkx/algorithms/dag.pyi | 21 ++++++++++ .../networkx/algorithms/distance_measures.pyi | 19 ++++++++++ .../networkx/algorithms/distance_regular.pyi | 2 + .../networkx/algorithms/dominance.pyi | 2 + .../networkx/algorithms/dominating.pyi | 2 + .../algorithms/efficiency_measures.pyi | 2 + stubs/networkx/networkx/algorithms/euler.pyi | 2 + .../algorithms/flow/boykovkolmogorov.pyi | 2 + .../algorithms/flow/capacityscaling.pyi | 2 + .../networkx/algorithms/flow/dinitz_alg.pyi | 2 + .../networkx/algorithms/flow/edmondskarp.pyi | 2 + .../networkx/algorithms/flow/mincost.pyi | 2 + .../algorithms/flow/networksimplex.pyi | 2 + .../networkx/algorithms/flow/preflowpush.pyi | 2 + .../flow/shortestaugmentingpath.pyi | 2 + .../networkx/algorithms/flow/utils.pyi | 2 + .../networkx/algorithms/graph_hashing.pyi | 2 + .../networkx/algorithms/graphical.pyi | 9 +++++ .../networkx/algorithms/hierarchy.pyi | 2 + stubs/networkx/networkx/algorithms/hybrid.pyi | 2 + .../networkx/networkx/algorithms/isolate.pyi | 2 + .../algorithms/isomorphism/ismags.pyi | 2 + .../algorithms/isomorphism/matchhelpers.pyi | 12 ++++++ .../isomorphism/tree_isomorphism.pyi | 2 + .../networkx/algorithms/isomorphism/vf2pp.pyi | 2 + .../algorithms/link_analysis/hits_alg.pyi | 2 + .../algorithms/link_analysis/pagerank_alg.pyi | 2 + .../networkx/algorithms/link_prediction.pyi | 11 ++++++ .../algorithms/lowest_common_ancestors.pyi | 2 + .../networkx/networkx/algorithms/matching.pyi | 9 +++++ .../networkx/algorithms/minors/__init__.pyi | 2 + .../algorithms/minors/contraction.pyi | 2 + stubs/networkx/networkx/algorithms/mis.pyi | 2 + stubs/networkx/networkx/algorithms/moral.pyi | 2 + .../algorithms/node_classification.pyi | 2 + .../networkx/algorithms/non_randomness.pyi | 2 + .../networkx/algorithms/operators/all.pyi | 2 + .../networkx/algorithms/operators/binary.pyi | 4 ++ .../networkx/algorithms/operators/product.pyi | 14 +++++++ .../networkx/algorithms/operators/unary.pyi | 2 + .../networkx/algorithms/planar_drawing.pyi | 2 + .../networkx/algorithms/polynomials.pyi | 2 + .../networkx/algorithms/reciprocity.pyi | 2 + .../networkx/networkx/algorithms/regular.pyi | 2 + .../networkx/networkx/algorithms/richclub.pyi | 2 + .../algorithms/shortest_paths/astar.pyi | 2 + .../algorithms/shortest_paths/dense.pyi | 2 + .../algorithms/shortest_paths/generic.pyi | 18 +++++++++ .../algorithms/shortest_paths/unweighted.pyi | 11 ++++++ .../algorithms/shortest_paths/weighted.pyi | 28 ++++++++++++++ .../networkx/algorithms/similarity.pyi | 10 +++++ .../networkx/algorithms/smallworld.pyi | 2 + .../networkx/networkx/algorithms/smetric.pyi | 2 + .../networkx/algorithms/sparsifiers.pyi | 2 + .../networkx/algorithms/structuralholes.pyi | 2 + .../networkx/algorithms/summarization.pyi | 2 + stubs/networkx/networkx/algorithms/swap.pyi | 2 + .../networkx/algorithms/threshold.pyi | 2 + .../networkx/algorithms/time_dependent.pyi | 2 + .../networkx/algorithms/tournament.pyi | 2 + .../algorithms/traversal/beamsearch.pyi | 2 + .../traversal/breadth_first_search.pyi | 16 ++++++++ .../traversal/depth_first_search.pyi | 10 +++++ .../networkx/algorithms/traversal/edgebfs.pyi | 2 + .../networkx/algorithms/traversal/edgedfs.pyi | 2 + .../networkx/algorithms/tree/branchings.pyi | 3 ++ .../networkx/algorithms/tree/coding.pyi | 2 + .../algorithms/tree/decomposition.pyi | 2 + .../networkx/networkx/algorithms/tree/mst.pyi | 16 ++++++++ .../networkx/algorithms/tree/operations.pyi | 2 + .../networkx/algorithms/tree/recognition.pyi | 2 + stubs/networkx/networkx/algorithms/triads.pyi | 2 + .../networkx/networkx/algorithms/vitality.pyi | 2 + .../networkx/networkx/algorithms/voronoi.pyi | 2 + stubs/networkx/networkx/algorithms/walks.pyi | 2 + stubs/networkx/networkx/algorithms/wiener.pyi | 6 +++ stubs/networkx/networkx/classes/coreviews.pyi | 14 +++++++ stubs/networkx/networkx/classes/digraph.pyi | 2 + stubs/networkx/networkx/classes/filters.pyi | 14 +++++++ stubs/networkx/networkx/classes/function.pyi | 5 +++ stubs/networkx/networkx/classes/graph.pyi | 2 + .../networkx/networkx/classes/graphviews.pyi | 2 + .../networkx/classes/multidigraph.pyi | 2 + .../networkx/networkx/classes/multigraph.pyi | 2 + .../networkx/networkx/classes/reportviews.pyi | 25 ++++++++++++ stubs/networkx/networkx/convert_matrix.pyi | 15 ++++++++ stubs/networkx/networkx/drawing/layout.pyi | 38 +++++++++++++++++++ stubs/networkx/networkx/drawing/nx_agraph.pyi | 2 + stubs/networkx/networkx/drawing/nx_latex.pyi | 2 + stubs/networkx/networkx/drawing/nx_pydot.pyi | 2 + stubs/networkx/networkx/drawing/nx_pylab.pyi | 18 +++++++++ stubs/networkx/networkx/exception.pyi | 17 +++++++++ stubs/networkx/networkx/generators/atlas.pyi | 2 + .../networkx/networkx/generators/classic.pyi | 29 ++++++++++++++ .../networkx/networkx/generators/cographs.pyi | 2 + .../networkx/generators/community.pyi | 13 +++++++ .../networkx/networkx/generators/directed.pyi | 2 + .../networkx/generators/duplication.pyi | 2 + stubs/networkx/networkx/generators/ego.pyi | 2 + .../networkx/generators/expanders.pyi | 15 ++++++++ .../networkx/generators/geometric.pyi | 16 ++++++++ .../networkx/generators/harary_graph.pyi | 2 + .../networkx/generators/intersection.pyi | 2 + .../networkx/generators/interval_graph.pyi | 2 + .../networkx/generators/joint_degree_seq.pyi | 2 + .../networkx/networkx/generators/lattice.pyi | 2 + stubs/networkx/networkx/generators/line.pyi | 2 + .../networkx/generators/mycielski.pyi | 2 + .../generators/nonisomorphic_trees.pyi | 2 + .../networkx/generators/random_clustered.pyi | 1 + .../networkx/generators/random_graphs.pyi | 22 +++++++++++ stubs/networkx/networkx/generators/small.pyi | 26 +++++++++++++ stubs/networkx/networkx/generators/social.pyi | 2 + .../generators/spectral_graph_forge.pyi | 2 + .../networkx/generators/stochastic.pyi | 2 + stubs/networkx/networkx/generators/sudoku.pyi | 2 + .../networkx/generators/time_series.pyi | 2 + stubs/networkx/networkx/generators/trees.pyi | 25 ++++++++++++ stubs/networkx/networkx/generators/triads.pyi | 2 + .../networkx/linalg/algebraicconnectivity.pyi | 2 + stubs/networkx/networkx/linalg/attrmatrix.pyi | 2 + .../networkx/linalg/bethehessianmatrix.pyi | 2 + .../networkx/networkx/linalg/graphmatrix.pyi | 2 + .../networkx/linalg/laplacianmatrix.pyi | 8 ++++ .../networkx/linalg/modularitymatrix.pyi | 2 + stubs/networkx/networkx/linalg/spectrum.pyi | 8 ++++ stubs/networkx/networkx/readwrite/adjlist.pyi | 2 + .../networkx/networkx/readwrite/edgelist.pyi | 9 +++++ stubs/networkx/networkx/readwrite/graph6.pyi | 2 + .../readwrite/json_graph/adjacency.pyi | 2 + .../readwrite/json_graph/cytoscape.pyi | 2 + .../readwrite/json_graph/node_link.pyi | 2 + .../networkx/readwrite/json_graph/tree.pyi | 2 + stubs/networkx/networkx/readwrite/leda.pyi | 2 + .../networkx/readwrite/multiline_adjlist.pyi | 2 + stubs/networkx/networkx/readwrite/pajek.pyi | 2 + stubs/networkx/networkx/readwrite/sparse6.pyi | 2 + stubs/networkx/networkx/relabel.pyi | 2 + stubs/networkx/networkx/utils/__init__.pyi | 3 ++ stubs/networkx/networkx/utils/configs.pyi | 2 +- stubs/networkx/networkx/utils/decorators.pyi | 2 + stubs/networkx/networkx/utils/heaps.pyi | 2 + .../networkx/networkx/utils/mapped_queue.pyi | 2 + .../networkx/utils/random_sequence.pyi | 9 +++++ stubs/networkx/networkx/utils/rcm.pyi | 2 + 226 files changed, 1014 insertions(+), 1 deletion(-) diff --git a/stubs/networkx/networkx/algorithms/approximation/clique.pyi b/stubs/networkx/networkx/algorithms/approximation/clique.pyi index 99c86b3a1..4587354a1 100644 --- a/stubs/networkx/networkx/algorithms/approximation/clique.pyi +++ b/stubs/networkx/networkx/algorithms/approximation/clique.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["clique_removal", "max_clique", "large_clique_size", "maximum_independent_set"] + @_dispatchable def maximum_independent_set(G: Graph[_Node]): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/approximation/clustering_coefficient.pyi b/stubs/networkx/networkx/algorithms/approximation/clustering_coefficient.pyi index b02ea8144..4c1a7d55c 100644 --- a/stubs/networkx/networkx/algorithms/approximation/clustering_coefficient.pyi +++ b/stubs/networkx/networkx/algorithms/approximation/clustering_coefficient.pyi @@ -2,5 +2,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = ["average_clustering"] + @_dispatchable def average_clustering(G: Graph[_Node], trials: int = 1000, seed: int | RandomState | None = None): ... diff --git a/stubs/networkx/networkx/algorithms/approximation/connectivity.pyi b/stubs/networkx/networkx/algorithms/approximation/connectivity.pyi index b20466e20..7adcdcb97 100644 --- a/stubs/networkx/networkx/algorithms/approximation/connectivity.pyi +++ b/stubs/networkx/networkx/algorithms/approximation/connectivity.pyi @@ -4,6 +4,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["local_node_connectivity", "node_connectivity", "all_pairs_node_connectivity"] + @_dispatchable def local_node_connectivity(G: Graph[_Node], source: _Node, target: _Node, cutoff: int | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/approximation/distance_measures.pyi b/stubs/networkx/networkx/algorithms/approximation/distance_measures.pyi index 08662306c..06ecfd181 100644 --- a/stubs/networkx/networkx/algorithms/approximation/distance_measures.pyi +++ b/stubs/networkx/networkx/algorithms/approximation/distance_measures.pyi @@ -2,5 +2,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = ["diameter"] + @_dispatchable def diameter(G: Graph[_Node], seed: int | RandomState | None = None): ... diff --git a/stubs/networkx/networkx/algorithms/approximation/dominating_set.pyi b/stubs/networkx/networkx/algorithms/approximation/dominating_set.pyi index 0eda30759..a24428f63 100644 --- a/stubs/networkx/networkx/algorithms/approximation/dominating_set.pyi +++ b/stubs/networkx/networkx/algorithms/approximation/dominating_set.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["min_weighted_dominating_set", "min_edge_dominating_set"] + @_dispatchable def min_weighted_dominating_set(G: Graph[_Node], weight: str | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/approximation/kcomponents.pyi b/stubs/networkx/networkx/algorithms/approximation/kcomponents.pyi index 27bdc9efc..b19657914 100644 --- a/stubs/networkx/networkx/algorithms/approximation/kcomponents.pyi +++ b/stubs/networkx/networkx/algorithms/approximation/kcomponents.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["k_components"] + @_dispatchable def k_components(G: Graph[_Node], min_density: float = 0.95): ... diff --git a/stubs/networkx/networkx/algorithms/approximation/matching.pyi b/stubs/networkx/networkx/algorithms/approximation/matching.pyi index 798b8f0ac..799818b49 100644 --- a/stubs/networkx/networkx/algorithms/approximation/matching.pyi +++ b/stubs/networkx/networkx/algorithms/approximation/matching.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["min_maximal_matching"] + @_dispatchable def min_maximal_matching(G: Graph[_Node]): ... diff --git a/stubs/networkx/networkx/algorithms/approximation/maxcut.pyi b/stubs/networkx/networkx/algorithms/approximation/maxcut.pyi index e84b601c8..af1c01f9e 100644 --- a/stubs/networkx/networkx/algorithms/approximation/maxcut.pyi +++ b/stubs/networkx/networkx/algorithms/approximation/maxcut.pyi @@ -4,6 +4,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = ["randomized_partitioning", "one_exchange"] + @_dispatchable def randomized_partitioning( G: Graph[_Node], seed: int | RandomState | None = None, p: float = 0.5, weight: str | None = None diff --git a/stubs/networkx/networkx/algorithms/approximation/ramsey.pyi b/stubs/networkx/networkx/algorithms/approximation/ramsey.pyi index 1769ec992..cd8d97f11 100644 --- a/stubs/networkx/networkx/algorithms/approximation/ramsey.pyi +++ b/stubs/networkx/networkx/algorithms/approximation/ramsey.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["ramsey_R2"] + @_dispatchable def ramsey_R2(G: Graph[_Node]): ... diff --git a/stubs/networkx/networkx/algorithms/approximation/steinertree.pyi b/stubs/networkx/networkx/algorithms/approximation/steinertree.pyi index f75bd9023..2b3bedd6f 100644 --- a/stubs/networkx/networkx/algorithms/approximation/steinertree.pyi +++ b/stubs/networkx/networkx/algorithms/approximation/steinertree.pyi @@ -4,6 +4,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["metric_closure", "steiner_tree"] + @_dispatchable def metric_closure(G: Graph[_Node], weight="weight"): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/approximation/traveling_salesman.pyi b/stubs/networkx/networkx/algorithms/approximation/traveling_salesman.pyi index bccba05d8..7d0b61f6f 100644 --- a/stubs/networkx/networkx/algorithms/approximation/traveling_salesman.pyi +++ b/stubs/networkx/networkx/algorithms/approximation/traveling_salesman.pyi @@ -6,6 +6,15 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = [ + "traveling_salesman_problem", + "christofides", + "asadpour_atsp", + "greedy_tsp", + "simulated_annealing_tsp", + "threshold_accepting_tsp", +] + @_dispatchable def christofides(G: Graph[_Node], weight: str | None = "weight", tree: Graph[_Node] | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/approximation/vertex_cover.pyi b/stubs/networkx/networkx/algorithms/approximation/vertex_cover.pyi index 26d3fb82b..ffd5206df 100644 --- a/stubs/networkx/networkx/algorithms/approximation/vertex_cover.pyi +++ b/stubs/networkx/networkx/algorithms/approximation/vertex_cover.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["min_weighted_vertex_cover"] + @_dispatchable def min_weighted_vertex_cover(G: Graph[_Node], weight: str | None = None): ... diff --git a/stubs/networkx/networkx/algorithms/assortativity/connectivity.pyi b/stubs/networkx/networkx/algorithms/assortativity/connectivity.pyi index 3c0c202c5..a4782a825 100644 --- a/stubs/networkx/networkx/algorithms/assortativity/connectivity.pyi +++ b/stubs/networkx/networkx/algorithms/assortativity/connectivity.pyi @@ -4,6 +4,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["average_degree_connectivity"] + @_dispatchable def average_degree_connectivity( G: Graph[_Node], source="in+out", target="in+out", nodes: Iterable[Incomplete] | None = None, weight: str | None = None diff --git a/stubs/networkx/networkx/algorithms/assortativity/correlation.pyi b/stubs/networkx/networkx/algorithms/assortativity/correlation.pyi index 9fe4866db..278938643 100644 --- a/stubs/networkx/networkx/algorithms/assortativity/correlation.pyi +++ b/stubs/networkx/networkx/algorithms/assortativity/correlation.pyi @@ -4,6 +4,13 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = [ + "degree_pearson_correlation_coefficient", + "degree_assortativity_coefficient", + "attribute_assortativity_coefficient", + "numeric_assortativity_coefficient", +] + @_dispatchable def degree_assortativity_coefficient( G: Graph[_Node], x: str = "out", y: str = "in", weight: str | None = None, nodes: Iterable[Incomplete] | None = None diff --git a/stubs/networkx/networkx/algorithms/assortativity/mixing.pyi b/stubs/networkx/networkx/algorithms/assortativity/mixing.pyi index c80fdae4e..4c5ced294 100644 --- a/stubs/networkx/networkx/algorithms/assortativity/mixing.pyi +++ b/stubs/networkx/networkx/algorithms/assortativity/mixing.pyi @@ -4,6 +4,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["attribute_mixing_matrix", "attribute_mixing_dict", "degree_mixing_matrix", "degree_mixing_dict", "mixing_dict"] + @_dispatchable def attribute_mixing_dict( G: Graph[_Node], attribute: str, nodes: Iterable[Incomplete] | None = None, normalized: bool = False diff --git a/stubs/networkx/networkx/algorithms/assortativity/neighbor_degree.pyi b/stubs/networkx/networkx/algorithms/assortativity/neighbor_degree.pyi index 042777067..d86ce3da8 100644 --- a/stubs/networkx/networkx/algorithms/assortativity/neighbor_degree.pyi +++ b/stubs/networkx/networkx/algorithms/assortativity/neighbor_degree.pyi @@ -4,6 +4,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["average_neighbor_degree"] + @_dispatchable def average_neighbor_degree( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/assortativity/pairs.pyi b/stubs/networkx/networkx/algorithms/assortativity/pairs.pyi index 4e9fb3c75..08898fc2f 100644 --- a/stubs/networkx/networkx/algorithms/assortativity/pairs.pyi +++ b/stubs/networkx/networkx/algorithms/assortativity/pairs.pyi @@ -4,6 +4,8 @@ from collections.abc import Generator, Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["node_attribute_xy", "node_degree_xy"] + @_dispatchable def node_attribute_xy( G: Graph[_Node], attribute, nodes: Iterable[Incomplete] | None = None diff --git a/stubs/networkx/networkx/algorithms/asteroidal.pyi b/stubs/networkx/networkx/algorithms/asteroidal.pyi index 21fdc6879..eaa859a3b 100644 --- a/stubs/networkx/networkx/algorithms/asteroidal.pyi +++ b/stubs/networkx/networkx/algorithms/asteroidal.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["is_at_free", "find_asteroidal_triple"] + @_dispatchable def find_asteroidal_triple(G: Graph[_Node]): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/bipartite/basic.pyi b/stubs/networkx/networkx/algorithms/bipartite/basic.pyi index c8d80a1b6..280d44b12 100644 --- a/stubs/networkx/networkx/algorithms/bipartite/basic.pyi +++ b/stubs/networkx/networkx/algorithms/bipartite/basic.pyi @@ -4,6 +4,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["is_bipartite", "is_bipartite_node_set", "color", "sets", "density", "degrees"] + @_dispatchable def color(G: Graph[_Node]): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/bipartite/centrality.pyi b/stubs/networkx/networkx/algorithms/bipartite/centrality.pyi index fdd621283..976948059 100644 --- a/stubs/networkx/networkx/algorithms/bipartite/centrality.pyi +++ b/stubs/networkx/networkx/algorithms/bipartite/centrality.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["degree_centrality", "betweenness_centrality", "closeness_centrality"] + @_dispatchable def degree_centrality(G: Graph[_Node], nodes): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/bipartite/cluster.pyi b/stubs/networkx/networkx/algorithms/bipartite/cluster.pyi index 7fed50d54..d4fffe4ed 100644 --- a/stubs/networkx/networkx/algorithms/bipartite/cluster.pyi +++ b/stubs/networkx/networkx/algorithms/bipartite/cluster.pyi @@ -4,6 +4,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["clustering", "average_clustering", "latapy_clustering", "robins_alexander_clustering"] + @_dispatchable def latapy_clustering(G: Graph[_Node], nodes: Iterable[Incomplete] | None = None, mode: str = "dot"): ... diff --git a/stubs/networkx/networkx/algorithms/bipartite/covering.pyi b/stubs/networkx/networkx/algorithms/bipartite/covering.pyi index 9d9fe9758..c915c19c0 100644 --- a/stubs/networkx/networkx/algorithms/bipartite/covering.pyi +++ b/stubs/networkx/networkx/algorithms/bipartite/covering.pyi @@ -4,5 +4,7 @@ from collections.abc import Callable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["min_edge_cover"] + @_dispatchable def min_edge_cover(G: Graph[_Node], matching_algorithm: Callable[..., Incomplete] | None = None): ... diff --git a/stubs/networkx/networkx/algorithms/bipartite/edgelist.pyi b/stubs/networkx/networkx/algorithms/bipartite/edgelist.pyi index 73ca8035d..18fb7d404 100644 --- a/stubs/networkx/networkx/algorithms/bipartite/edgelist.pyi +++ b/stubs/networkx/networkx/algorithms/bipartite/edgelist.pyi @@ -4,6 +4,8 @@ from collections.abc import Generator from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["generate_edgelist", "write_edgelist", "parse_edgelist", "read_edgelist"] + @_dispatchable def write_edgelist(G, path, comments: str = "#", delimiter: str = " ", data: bool = True, encoding: str = "utf-8") -> None: ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/bipartite/extendability.pyi b/stubs/networkx/networkx/algorithms/bipartite/extendability.pyi index 9bfee7872..155cb1cb0 100644 --- a/stubs/networkx/networkx/algorithms/bipartite/extendability.pyi +++ b/stubs/networkx/networkx/algorithms/bipartite/extendability.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["maximal_extendability"] + @_dispatchable def maximal_extendability(G: Graph[_Node]): ... diff --git a/stubs/networkx/networkx/algorithms/bipartite/generators.pyi b/stubs/networkx/networkx/algorithms/bipartite/generators.pyi index 3fe8b22ca..f9aef242b 100644 --- a/stubs/networkx/networkx/algorithms/bipartite/generators.pyi +++ b/stubs/networkx/networkx/algorithms/bipartite/generators.pyi @@ -5,6 +5,17 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = [ + "configuration_model", + "havel_hakimi_graph", + "reverse_havel_hakimi_graph", + "alternating_havel_hakimi_graph", + "preferential_attachment_graph", + "random_graph", + "gnmk_random_graph", + "complete_bipartite_graph", +] + @_dispatchable def complete_bipartite_graph(n1, n2, create_using: Graph[_Node] | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/bipartite/matching.pyi b/stubs/networkx/networkx/algorithms/bipartite/matching.pyi index b744c44f2..91ef13610 100644 --- a/stubs/networkx/networkx/algorithms/bipartite/matching.pyi +++ b/stubs/networkx/networkx/algorithms/bipartite/matching.pyi @@ -4,6 +4,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["maximum_matching", "hopcroft_karp_matching", "eppstein_matching", "to_vertex_cover", "minimum_weight_full_matching"] + @_dispatchable def hopcroft_karp_matching(G: Graph[_Node], top_nodes: Iterable[_Node] | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/bipartite/matrix.pyi b/stubs/networkx/networkx/algorithms/bipartite/matrix.pyi index f8a7af78c..2e484482a 100644 --- a/stubs/networkx/networkx/algorithms/bipartite/matrix.pyi +++ b/stubs/networkx/networkx/algorithms/bipartite/matrix.pyi @@ -4,6 +4,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["biadjacency_matrix", "from_biadjacency_matrix"] + @_dispatchable def biadjacency_matrix( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/bipartite/projection.pyi b/stubs/networkx/networkx/algorithms/bipartite/projection.pyi index c545b78ff..9f1fd27d3 100644 --- a/stubs/networkx/networkx/algorithms/bipartite/projection.pyi +++ b/stubs/networkx/networkx/algorithms/bipartite/projection.pyi @@ -4,6 +4,14 @@ from collections.abc import Callable, Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = [ + "projected_graph", + "weighted_projected_graph", + "collaboration_weighted_projected_graph", + "overlap_weighted_projected_graph", + "generic_weighted_projected_graph", +] + @_dispatchable def projected_graph(B: Graph[_Node], nodes: Iterable[Incomplete], multigraph: bool = False): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/bipartite/redundancy.pyi b/stubs/networkx/networkx/algorithms/bipartite/redundancy.pyi index 474329b6e..cb7233ef9 100644 --- a/stubs/networkx/networkx/algorithms/bipartite/redundancy.pyi +++ b/stubs/networkx/networkx/algorithms/bipartite/redundancy.pyi @@ -4,5 +4,7 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["node_redundancy"] + @_dispatchable def node_redundancy(G: Graph[_Node], nodes: Iterable[Incomplete] | None = None): ... diff --git a/stubs/networkx/networkx/algorithms/bipartite/spectral.pyi b/stubs/networkx/networkx/algorithms/bipartite/spectral.pyi index c3060cce5..1778bd31c 100644 --- a/stubs/networkx/networkx/algorithms/bipartite/spectral.pyi +++ b/stubs/networkx/networkx/algorithms/bipartite/spectral.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["spectral_bipartivity"] + @_dispatchable def spectral_bipartivity(G: Graph[_Node], nodes=None, weight: str = "weight"): ... diff --git a/stubs/networkx/networkx/algorithms/boundary.pyi b/stubs/networkx/networkx/algorithms/boundary.pyi index e85644bef..08fb92032 100644 --- a/stubs/networkx/networkx/algorithms/boundary.pyi +++ b/stubs/networkx/networkx/algorithms/boundary.pyi @@ -6,6 +6,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable _U = TypeVar("_U") +__all__ = ["edge_boundary", "node_boundary"] @overload def edge_boundary( diff --git a/stubs/networkx/networkx/algorithms/bridges.pyi b/stubs/networkx/networkx/algorithms/bridges.pyi index 2beb94e80..530802159 100644 --- a/stubs/networkx/networkx/algorithms/bridges.pyi +++ b/stubs/networkx/networkx/algorithms/bridges.pyi @@ -4,6 +4,8 @@ from typing import overload from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["bridges", "has_bridges", "local_bridges"] + @_dispatchable def bridges(G: Graph[_Node], root: _Node | None = None) -> Generator[_Node, None, None]: ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/centrality/betweenness.pyi b/stubs/networkx/networkx/algorithms/centrality/betweenness.pyi index 7d8351a67..ddaf1288a 100644 --- a/stubs/networkx/networkx/algorithms/centrality/betweenness.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/betweenness.pyi @@ -2,6 +2,8 @@ from networkx.classes.graph import Graph, _Edge, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = ["betweenness_centrality", "edge_betweenness_centrality"] + @_dispatchable def betweenness_centrality( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/centrality/betweenness_subset.pyi b/stubs/networkx/networkx/algorithms/centrality/betweenness_subset.pyi index 3f3af3e5b..8f91e193b 100644 --- a/stubs/networkx/networkx/algorithms/centrality/betweenness_subset.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/betweenness_subset.pyi @@ -3,6 +3,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Edge, _Node from networkx.utils.backends import _dispatchable +__all__ = ["betweenness_centrality_subset", "edge_betweenness_centrality_subset"] + @_dispatchable def betweenness_centrality_subset( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/centrality/closeness.pyi b/stubs/networkx/networkx/algorithms/centrality/closeness.pyi index edfae3a7b..72201138a 100644 --- a/stubs/networkx/networkx/algorithms/centrality/closeness.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/closeness.pyi @@ -3,6 +3,8 @@ from _typeshed import Incomplete, SupportsGetItem from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["closeness_centrality", "incremental_closeness_centrality"] + @_dispatchable def closeness_centrality( G: Graph[_Node], u: _Node | None = None, distance=None, wf_improved: bool | None = True diff --git a/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness.pyi b/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness.pyi index 3995a217f..7d39f6467 100644 --- a/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness.pyi @@ -2,6 +2,12 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = [ + "current_flow_betweenness_centrality", + "approximate_current_flow_betweenness_centrality", + "edge_current_flow_betweenness_centrality", +] + @_dispatchable def approximate_current_flow_betweenness_centrality( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness_subset.pyi b/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness_subset.pyi index 7712c02ac..9fe21cad8 100644 --- a/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness_subset.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness_subset.pyi @@ -3,6 +3,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["current_flow_betweenness_centrality_subset", "edge_current_flow_betweenness_centrality_subset"] + @_dispatchable def current_flow_betweenness_centrality_subset( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/centrality/current_flow_closeness.pyi b/stubs/networkx/networkx/algorithms/centrality/current_flow_closeness.pyi index 534c06845..00ff9c43f 100644 --- a/stubs/networkx/networkx/algorithms/centrality/current_flow_closeness.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/current_flow_closeness.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["current_flow_closeness_centrality", "information_centrality"] + @_dispatchable def current_flow_closeness_centrality(G: Graph[_Node], weight: str | None = None, dtype: type = ..., solver: str = "lu"): ... diff --git a/stubs/networkx/networkx/algorithms/centrality/degree_alg.pyi b/stubs/networkx/networkx/algorithms/centrality/degree_alg.pyi index 30618e780..a3d4719c8 100644 --- a/stubs/networkx/networkx/algorithms/centrality/degree_alg.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/degree_alg.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["degree_centrality", "in_degree_centrality", "out_degree_centrality"] + @_dispatchable def degree_centrality(G: Graph[_Node]) -> dict[_Node, float]: ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/centrality/dispersion.pyi b/stubs/networkx/networkx/algorithms/centrality/dispersion.pyi index b673beb87..4cc9ed0f4 100644 --- a/stubs/networkx/networkx/algorithms/centrality/dispersion.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/dispersion.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["dispersion"] + @_dispatchable def dispersion( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/centrality/eigenvector.pyi b/stubs/networkx/networkx/algorithms/centrality/eigenvector.pyi index 8c9ccd34c..5e1af9216 100644 --- a/stubs/networkx/networkx/algorithms/centrality/eigenvector.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/eigenvector.pyi @@ -3,6 +3,8 @@ from _typeshed import Incomplete, SupportsGetItem from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["eigenvector_centrality", "eigenvector_centrality_numpy"] + @_dispatchable def eigenvector_centrality( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/centrality/group.pyi b/stubs/networkx/networkx/algorithms/centrality/group.pyi index 3229bdec3..0efcdbbe4 100644 --- a/stubs/networkx/networkx/algorithms/centrality/group.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/group.pyi @@ -4,6 +4,15 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = [ + "group_betweenness_centrality", + "group_closeness_centrality", + "group_degree_centrality", + "group_in_degree_centrality", + "group_out_degree_centrality", + "prominent_group", +] + @_dispatchable def group_betweenness_centrality( G: Graph[_Node], C, normalized: bool | None = True, weight: str | None = None, endpoints: bool | None = False diff --git a/stubs/networkx/networkx/algorithms/centrality/harmonic.pyi b/stubs/networkx/networkx/algorithms/centrality/harmonic.pyi index af566d1c4..7b75d7ee7 100644 --- a/stubs/networkx/networkx/algorithms/centrality/harmonic.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/harmonic.pyi @@ -4,6 +4,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["harmonic_centrality"] + @_dispatchable def harmonic_centrality( G: Graph[_Node], nbunch: Iterable[Incomplete] | None = None, distance=None, sources: Iterable[Incomplete] | None = None diff --git a/stubs/networkx/networkx/algorithms/centrality/katz.pyi b/stubs/networkx/networkx/algorithms/centrality/katz.pyi index ba353da7a..6f0f4f3ba 100644 --- a/stubs/networkx/networkx/algorithms/centrality/katz.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/katz.pyi @@ -3,6 +3,8 @@ from _typeshed import Incomplete, SupportsGetItem from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["katz_centrality", "katz_centrality_numpy"] + @_dispatchable def katz_centrality( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/centrality/laplacian.pyi b/stubs/networkx/networkx/algorithms/centrality/laplacian.pyi index 6869ac801..b68497906 100644 --- a/stubs/networkx/networkx/algorithms/centrality/laplacian.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/laplacian.pyi @@ -3,6 +3,8 @@ from collections.abc import Collection from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["laplacian_centrality"] + @_dispatchable def laplacian_centrality( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/centrality/percolation.pyi b/stubs/networkx/networkx/algorithms/centrality/percolation.pyi index b9124b5e7..f6bee5c6b 100644 --- a/stubs/networkx/networkx/algorithms/centrality/percolation.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/percolation.pyi @@ -3,6 +3,8 @@ from _typeshed import Incomplete, SupportsGetItem from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["percolation_centrality"] + @_dispatchable def percolation_centrality( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/centrality/reaching.pyi b/stubs/networkx/networkx/algorithms/centrality/reaching.pyi index b2a1a2a0d..f99040b4f 100644 --- a/stubs/networkx/networkx/algorithms/centrality/reaching.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/reaching.pyi @@ -4,6 +4,8 @@ from networkx.classes.digraph import DiGraph from networkx.classes.graph import _Node from networkx.utils.backends import _dispatchable +__all__ = ["global_reaching_centrality", "local_reaching_centrality"] + @_dispatchable def global_reaching_centrality(G: DiGraph[_Node], weight: str | None = None, normalized: bool | None = True): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/centrality/second_order.pyi b/stubs/networkx/networkx/algorithms/centrality/second_order.pyi index df8b70636..cda7cac85 100644 --- a/stubs/networkx/networkx/algorithms/centrality/second_order.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/second_order.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["second_order_centrality"] + @_dispatchable def second_order_centrality(G: Graph[_Node], weight: str | None = "weight"): ... diff --git a/stubs/networkx/networkx/algorithms/centrality/subgraph_alg.pyi b/stubs/networkx/networkx/algorithms/centrality/subgraph_alg.pyi index 4035e39ea..94075f254 100644 --- a/stubs/networkx/networkx/algorithms/centrality/subgraph_alg.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/subgraph_alg.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["subgraph_centrality_exp", "subgraph_centrality", "communicability_betweenness_centrality", "estrada_index"] + @_dispatchable def subgraph_centrality_exp(G: Graph[_Node]): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/centrality/trophic.pyi b/stubs/networkx/networkx/algorithms/centrality/trophic.pyi index 654ecef94..f0ae0a5b5 100644 --- a/stubs/networkx/networkx/algorithms/centrality/trophic.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/trophic.pyi @@ -2,6 +2,8 @@ from networkx.classes.digraph import DiGraph from networkx.classes.graph import _Node from networkx.utils.backends import _dispatchable +__all__ = ["trophic_levels", "trophic_differences", "trophic_incoherence_parameter"] + @_dispatchable def trophic_levels(G: DiGraph[_Node], weight="weight"): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/centrality/voterank_alg.pyi b/stubs/networkx/networkx/algorithms/centrality/voterank_alg.pyi index c313b9c8e..bf5969f63 100644 --- a/stubs/networkx/networkx/algorithms/centrality/voterank_alg.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/voterank_alg.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["voterank"] + @_dispatchable def voterank(G: Graph[_Node], number_of_nodes: int | None = None): ... diff --git a/stubs/networkx/networkx/algorithms/chains.pyi b/stubs/networkx/networkx/algorithms/chains.pyi index e7f99119c..a91aed52d 100644 --- a/stubs/networkx/networkx/algorithms/chains.pyi +++ b/stubs/networkx/networkx/algorithms/chains.pyi @@ -3,5 +3,7 @@ from collections.abc import Generator from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["chain_decomposition"] + @_dispatchable def chain_decomposition(G: Graph[_Node], root: _Node | None = None) -> Generator[list[tuple[_Node, _Node]], None, None]: ... diff --git a/stubs/networkx/networkx/algorithms/chordal.pyi b/stubs/networkx/networkx/algorithms/chordal.pyi index 264e5c769..628df41c1 100644 --- a/stubs/networkx/networkx/algorithms/chordal.pyi +++ b/stubs/networkx/networkx/algorithms/chordal.pyi @@ -1,10 +1,20 @@ import sys +from _typeshed import Incomplete from collections.abc import Generator from networkx.classes.graph import Graph, _Node from networkx.exception import NetworkXException from networkx.utils.backends import _dispatchable +__all__ = [ + "is_chordal", + "find_induced_nodes", + "chordal_graph_cliques", + "chordal_graph_treewidth", + "NetworkXTreewidthBoundExceeded", + "complete_to_chordal_graph", +] + class NetworkXTreewidthBoundExceeded(NetworkXException): ... @_dispatchable @@ -15,3 +25,5 @@ def find_induced_nodes(G: Graph[_Node], s: _Node, t: _Node, treewidth_bound: flo def chordal_graph_cliques(G: Graph[_Node]) -> Generator[frozenset[_Node], None, None]: ... @_dispatchable def chordal_graph_treewidth(G: Graph[_Node]) -> int: ... +@_dispatchable +def complete_to_chordal_graph(G) -> tuple[Incomplete, dict[Incomplete, int]]: ... diff --git a/stubs/networkx/networkx/algorithms/clique.pyi b/stubs/networkx/networkx/algorithms/clique.pyi index 72af1e40f..3fa315dcb 100644 --- a/stubs/networkx/networkx/algorithms/clique.pyi +++ b/stubs/networkx/networkx/algorithms/clique.pyi @@ -5,6 +5,17 @@ from typing import overload from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = [ + "find_cliques", + "find_cliques_recursive", + "make_max_clique_graph", + "make_clique_bipartite", + "node_clique_number", + "number_of_cliques", + "enumerate_all_cliques", + "max_weight_clique", +] + @_dispatchable def enumerate_all_cliques(G: Graph[_Node]) -> Generator[list[_Node], None, None]: ... @_dispatchable @@ -23,3 +34,6 @@ def node_clique_number( ) -> dict[_Node, int]: ... @overload def node_clique_number(G: Graph[_Node], nodes=None, cliques: Iterable[Incomplete] | None = None, separate_nodes=False) -> int: ... +def number_of_cliques(G, nodes=None, cliques=None) -> int | dict[Incomplete, Incomplete]: ... +@_dispatchable +def max_weight_clique(G, weight="weight") -> tuple[Incomplete, Incomplete]: ... diff --git a/stubs/networkx/networkx/algorithms/cluster.pyi b/stubs/networkx/networkx/algorithms/cluster.pyi index 4558712c7..dfa594aca 100644 --- a/stubs/networkx/networkx/algorithms/cluster.pyi +++ b/stubs/networkx/networkx/algorithms/cluster.pyi @@ -3,6 +3,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["triangles", "average_clustering", "clustering", "transitivity", "square_clustering", "generalized_degree"] + @_dispatchable def triangles(G: Graph[_Node], nodes=None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/coloring/equitable_coloring.pyi b/stubs/networkx/networkx/algorithms/coloring/equitable_coloring.pyi index 488bcd7fa..1e768dd50 100644 --- a/stubs/networkx/networkx/algorithms/coloring/equitable_coloring.pyi +++ b/stubs/networkx/networkx/algorithms/coloring/equitable_coloring.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["equitable_color"] + @_dispatchable def equitable_color(G: Graph[_Node], num_colors): ... diff --git a/stubs/networkx/networkx/algorithms/communicability_alg.pyi b/stubs/networkx/networkx/algorithms/communicability_alg.pyi index a36df0c93..4cbbc0adb 100644 --- a/stubs/networkx/networkx/algorithms/communicability_alg.pyi +++ b/stubs/networkx/networkx/algorithms/communicability_alg.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["communicability", "communicability_exp"] + @_dispatchable def communicability(G: Graph[_Node]): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/community/asyn_fluid.pyi b/stubs/networkx/networkx/algorithms/community/asyn_fluid.pyi index 17a087cd6..5729204d3 100644 --- a/stubs/networkx/networkx/algorithms/community/asyn_fluid.pyi +++ b/stubs/networkx/networkx/algorithms/community/asyn_fluid.pyi @@ -2,5 +2,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = ["asyn_fluidc"] + @_dispatchable def asyn_fluidc(G: Graph[_Node], k: int, max_iter: int = 100, seed: int | RandomState | None = None): ... diff --git a/stubs/networkx/networkx/algorithms/community/centrality.pyi b/stubs/networkx/networkx/algorithms/community/centrality.pyi index 8fbd47609..ec3b07141 100644 --- a/stubs/networkx/networkx/algorithms/community/centrality.pyi +++ b/stubs/networkx/networkx/algorithms/community/centrality.pyi @@ -4,6 +4,8 @@ from collections.abc import Callable, Generator from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["girvan_newman"] + @_dispatchable def girvan_newman( G: Graph[_Node], most_valuable_edge: Callable[..., Incomplete] | None = None diff --git a/stubs/networkx/networkx/algorithms/community/community_utils.pyi b/stubs/networkx/networkx/algorithms/community/community_utils.pyi index 2528f102b..032161edf 100644 --- a/stubs/networkx/networkx/algorithms/community/community_utils.pyi +++ b/stubs/networkx/networkx/algorithms/community/community_utils.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["is_partition"] + @_dispatchable def is_partition(G: Graph[_Node], communities): ... diff --git a/stubs/networkx/networkx/algorithms/community/kclique.pyi b/stubs/networkx/networkx/algorithms/community/kclique.pyi index 13c777be2..31eaf1d71 100644 --- a/stubs/networkx/networkx/algorithms/community/kclique.pyi +++ b/stubs/networkx/networkx/algorithms/community/kclique.pyi @@ -4,5 +4,7 @@ from collections.abc import Generator from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["k_clique_communities"] + @_dispatchable def k_clique_communities(G: Graph[_Node], k: int, cliques=None) -> Generator[Incomplete, None, None]: ... diff --git a/stubs/networkx/networkx/algorithms/community/kernighan_lin.pyi b/stubs/networkx/networkx/algorithms/community/kernighan_lin.pyi index 4bb3fce53..00133f831 100644 --- a/stubs/networkx/networkx/algorithms/community/kernighan_lin.pyi +++ b/stubs/networkx/networkx/algorithms/community/kernighan_lin.pyi @@ -4,6 +4,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = ["kernighan_lin_bisection"] + @_dispatchable def kernighan_lin_bisection( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/community/label_propagation.pyi b/stubs/networkx/networkx/algorithms/community/label_propagation.pyi index 7679d01bc..23840b8cb 100644 --- a/stubs/networkx/networkx/algorithms/community/label_propagation.pyi +++ b/stubs/networkx/networkx/algorithms/community/label_propagation.pyi @@ -5,6 +5,10 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = ["label_propagation_communities", "asyn_lpa_communities", "fast_label_propagation_communities"] + +@_dispatchable +def fast_label_propagation_communities(G, *, weight=None, seed=None) -> Generator[Incomplete]: ... @_dispatchable def asyn_lpa_communities( G: Graph[_Node], weight: str | None = None, seed: int | RandomState | None = None diff --git a/stubs/networkx/networkx/algorithms/community/louvain.pyi b/stubs/networkx/networkx/algorithms/community/louvain.pyi index be5194a91..40cf510a5 100644 --- a/stubs/networkx/networkx/algorithms/community/louvain.pyi +++ b/stubs/networkx/networkx/algorithms/community/louvain.pyi @@ -5,6 +5,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = ["louvain_communities", "louvain_partitions"] + @_dispatchable def louvain_communities( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/community/lukes.pyi b/stubs/networkx/networkx/algorithms/community/lukes.pyi index 81a7a1335..766f478a0 100644 --- a/stubs/networkx/networkx/algorithms/community/lukes.pyi +++ b/stubs/networkx/networkx/algorithms/community/lukes.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["lukes_partitioning"] + @_dispatchable def lukes_partitioning(G: Graph[_Node], max_size: int, node_weight=None, edge_weight=None): ... diff --git a/stubs/networkx/networkx/algorithms/community/modularity_max.pyi b/stubs/networkx/networkx/algorithms/community/modularity_max.pyi index b93dbf520..5cfedb7d5 100644 --- a/stubs/networkx/networkx/algorithms/community/modularity_max.pyi +++ b/stubs/networkx/networkx/algorithms/community/modularity_max.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["greedy_modularity_communities", "naive_greedy_modularity_communities"] + @_dispatchable def greedy_modularity_communities( G: Graph[_Node], weight: str | None = None, resolution: float | None = 1, cutoff: int | None = 1, best_n: int | None = None diff --git a/stubs/networkx/networkx/algorithms/components/attracting.pyi b/stubs/networkx/networkx/algorithms/components/attracting.pyi index 93e97a4fb..88649cf94 100644 --- a/stubs/networkx/networkx/algorithms/components/attracting.pyi +++ b/stubs/networkx/networkx/algorithms/components/attracting.pyi @@ -3,6 +3,8 @@ from collections.abc import Generator from networkx.utils.backends import _dispatchable +__all__ = ["number_attracting_components", "attracting_components", "is_attracting_component"] + @_dispatchable def attracting_components(G) -> Generator[Incomplete, None, None]: ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/components/biconnected.pyi b/stubs/networkx/networkx/algorithms/components/biconnected.pyi index 782f1c690..b7056599a 100644 --- a/stubs/networkx/networkx/algorithms/components/biconnected.pyi +++ b/stubs/networkx/networkx/algorithms/components/biconnected.pyi @@ -4,6 +4,8 @@ from collections.abc import Generator from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["biconnected_components", "biconnected_component_edges", "is_biconnected", "articulation_points"] + @_dispatchable def is_biconnected(G: Graph[_Node]): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/components/connected.pyi b/stubs/networkx/networkx/algorithms/components/connected.pyi index 55dc4cd2b..c13a09e93 100644 --- a/stubs/networkx/networkx/algorithms/components/connected.pyi +++ b/stubs/networkx/networkx/algorithms/components/connected.pyi @@ -4,6 +4,8 @@ from collections.abc import Generator from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["number_connected_components", "connected_components", "is_connected", "node_connected_component"] + @_dispatchable def connected_components(G: Graph[_Node]) -> Generator[Incomplete, None, None]: ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/components/semiconnected.pyi b/stubs/networkx/networkx/algorithms/components/semiconnected.pyi index 178a602e4..9a02ac4e7 100644 --- a/stubs/networkx/networkx/algorithms/components/semiconnected.pyi +++ b/stubs/networkx/networkx/algorithms/components/semiconnected.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["is_semiconnected"] + @_dispatchable def is_semiconnected(G: Graph[_Node]): ... diff --git a/stubs/networkx/networkx/algorithms/components/strongly_connected.pyi b/stubs/networkx/networkx/algorithms/components/strongly_connected.pyi index 4747f4950..7bbf495ae 100644 --- a/stubs/networkx/networkx/algorithms/components/strongly_connected.pyi +++ b/stubs/networkx/networkx/algorithms/components/strongly_connected.pyi @@ -4,6 +4,14 @@ from networkx.classes.digraph import DiGraph from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = [ + "number_strongly_connected_components", + "strongly_connected_components", + "is_strongly_connected", + "kosaraju_strongly_connected_components", + "condensation", +] + @_dispatchable def strongly_connected_components(G: Graph[_Node]) -> Generator[set[_Node], None, None]: ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/components/weakly_connected.pyi b/stubs/networkx/networkx/algorithms/components/weakly_connected.pyi index 84cccf2f0..b854f21ac 100644 --- a/stubs/networkx/networkx/algorithms/components/weakly_connected.pyi +++ b/stubs/networkx/networkx/algorithms/components/weakly_connected.pyi @@ -3,6 +3,8 @@ from collections.abc import Generator from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["number_weakly_connected_components", "weakly_connected_components", "is_weakly_connected"] + @_dispatchable def weakly_connected_components(G: Graph[_Node]) -> Generator[set[_Node], None, None]: ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/connectivity/edge_augmentation.pyi b/stubs/networkx/networkx/algorithms/connectivity/edge_augmentation.pyi index de9d9d647..31ef0154f 100644 --- a/stubs/networkx/networkx/algorithms/connectivity/edge_augmentation.pyi +++ b/stubs/networkx/networkx/algorithms/connectivity/edge_augmentation.pyi @@ -4,6 +4,8 @@ from collections.abc import Generator from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["k_edge_augmentation", "is_k_edge_connected", "is_locally_k_edge_connected"] + @_dispatchable def is_k_edge_connected(G: Graph[_Node], k: int): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi b/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi index 67927d5cb..938cae6ec 100644 --- a/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi +++ b/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi @@ -4,6 +4,8 @@ from collections.abc import Generator from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["k_edge_components", "k_edge_subgraphs", "bridge_components", "EdgeComponentAuxGraph"] + @_dispatchable def k_edge_components(G: Graph[_Node], k: int): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/connectivity/stoerwagner.pyi b/stubs/networkx/networkx/algorithms/connectivity/stoerwagner.pyi index c0b8cd3a7..501e5bf82 100644 --- a/stubs/networkx/networkx/algorithms/connectivity/stoerwagner.pyi +++ b/stubs/networkx/networkx/algorithms/connectivity/stoerwagner.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["stoer_wagner"] + @_dispatchable def stoer_wagner(G: Graph[_Node], weight: str = "weight", heap: type = ...): ... diff --git a/stubs/networkx/networkx/algorithms/connectivity/utils.pyi b/stubs/networkx/networkx/algorithms/connectivity/utils.pyi index b43489088..bac3f5d92 100644 --- a/stubs/networkx/networkx/algorithms/connectivity/utils.pyi +++ b/stubs/networkx/networkx/algorithms/connectivity/utils.pyi @@ -1,5 +1,7 @@ from networkx.utils.backends import _dispatchable +__all__ = ["build_auxiliary_node_connectivity", "build_auxiliary_edge_connectivity"] + @_dispatchable def build_auxiliary_node_connectivity(G): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/core.pyi b/stubs/networkx/networkx/algorithms/core.pyi index 401797dc8..acd4b9b7a 100644 --- a/stubs/networkx/networkx/algorithms/core.pyi +++ b/stubs/networkx/networkx/algorithms/core.pyi @@ -3,6 +3,8 @@ from _typeshed import Incomplete, SupportsGetItem from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["core_number", "k_core", "k_shell", "k_crust", "k_corona", "k_truss", "onion_layers"] + @_dispatchable def core_number(G: Graph[_Node]): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/covering.pyi b/stubs/networkx/networkx/algorithms/covering.pyi index 0680bbc27..3dd7daadc 100644 --- a/stubs/networkx/networkx/algorithms/covering.pyi +++ b/stubs/networkx/networkx/algorithms/covering.pyi @@ -4,6 +4,8 @@ from collections.abc import Callable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["min_edge_cover", "is_edge_cover"] + @_dispatchable def min_edge_cover(G: Graph[_Node], matching_algorithm: Callable[..., Incomplete] | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/cuts.pyi b/stubs/networkx/networkx/algorithms/cuts.pyi index 4f3e3474b..be3f75e20 100644 --- a/stubs/networkx/networkx/algorithms/cuts.pyi +++ b/stubs/networkx/networkx/algorithms/cuts.pyi @@ -3,6 +3,17 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = [ + "boundary_expansion", + "conductance", + "cut_size", + "edge_expansion", + "mixing_expansion", + "node_expansion", + "normalized_cut_size", + "volume", +] + @_dispatchable def cut_size(G: Graph[_Node], S: Iterable[_Node], T: Iterable[_Node] | None = None, weight: str | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/cycles.pyi b/stubs/networkx/networkx/algorithms/cycles.pyi index 9f8b88751..0c4d9944f 100644 --- a/stubs/networkx/networkx/algorithms/cycles.pyi +++ b/stubs/networkx/networkx/algorithms/cycles.pyi @@ -5,6 +5,16 @@ from networkx.classes.digraph import DiGraph from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = [ + "cycle_basis", + "simple_cycles", + "recursive_simple_cycles", + "find_cycle", + "minimum_cycle_basis", + "chordless_cycles", + "girth", +] + @_dispatchable def cycle_basis(G: Graph[_Node], root: _Node | None = None): ... @_dispatchable @@ -24,3 +34,5 @@ def recursive_simple_cycles(G: DiGraph[_Node]): ... def find_cycle(G: Graph[_Node], source=None, orientation=None): ... @_dispatchable def minimum_cycle_basis(G: Graph[_Node], weight: str | None = None): ... +@_dispatchable +def girth(G) -> float | int: ... diff --git a/stubs/networkx/networkx/algorithms/d_separation.pyi b/stubs/networkx/networkx/algorithms/d_separation.pyi index e1eb57540..ad2bf15dd 100644 --- a/stubs/networkx/networkx/algorithms/d_separation.pyi +++ b/stubs/networkx/networkx/algorithms/d_separation.pyi @@ -1,7 +1,15 @@ +from _typeshed import Incomplete + from networkx.classes.digraph import DiGraph from networkx.classes.graph import _Node from networkx.utils.backends import _dispatchable +__all__ = ["is_d_separator", "is_minimal_d_separator", "find_minimal_d_separator", "d_separated", "minimal_d_separator"] + +@_dispatchable +def is_d_separator(G, x, y, z) -> bool: ... +@_dispatchable +def find_minimal_d_separator(G, x, y, *, included=None, restricted=None) -> set[Incomplete] | None: ... @_dispatchable def d_separated(G, x, y, z): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/dag.pyi b/stubs/networkx/networkx/algorithms/dag.pyi index 07c3b3def..b44d34db3 100644 --- a/stubs/networkx/networkx/algorithms/dag.pyi +++ b/stubs/networkx/networkx/algorithms/dag.pyi @@ -5,6 +5,25 @@ from networkx.classes.digraph import DiGraph from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = [ + "descendants", + "ancestors", + "topological_sort", + "lexicographical_topological_sort", + "all_topological_sorts", + "topological_generations", + "is_directed_acyclic_graph", + "is_aperiodic", + "transitive_closure", + "transitive_closure_dag", + "transitive_reduction", + "antichains", + "dag_longest_path", + "dag_longest_path_length", + "dag_to_branching", + "compute_v_structures", +] + @_dispatchable def descendants(G: Graph[_Node], source) -> set[_Node]: ... @_dispatchable @@ -42,3 +61,5 @@ def dag_longest_path( def dag_longest_path_length(G: DiGraph[_Node], weight: str | None = "weight", default_weight: int | None = 1) -> int: ... @_dispatchable def dag_to_branching(G: Graph[_Node]) -> Graph[_Node]: ... +@_dispatchable +def compute_v_structures(G) -> Generator[tuple[Incomplete, Incomplete, Incomplete]]: ... diff --git a/stubs/networkx/networkx/algorithms/distance_measures.pyi b/stubs/networkx/networkx/algorithms/distance_measures.pyi index 1f768011a..a74483194 100644 --- a/stubs/networkx/networkx/algorithms/distance_measures.pyi +++ b/stubs/networkx/networkx/algorithms/distance_measures.pyi @@ -1,11 +1,26 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = [ + "eccentricity", + "diameter", + "harmonic_diameter", + "radius", + "periphery", + "center", + "barycenter", + "resistance_distance", + "kemeny_constant", + "effective_graph_resistance", +] + @_dispatchable def eccentricity(G: Graph[_Node], v: _Node | None = None, sp=None, weight: str | None = None): ... @_dispatchable def diameter(G: Graph[_Node], e=None, usebounds=False, weight: str | None = None): ... @_dispatchable +def harmonic_diameter(G, sp=None) -> float: ... +@_dispatchable def periphery(G: Graph[_Node], e=None, usebounds=False, weight: str | None = None): ... @_dispatchable def radius(G: Graph[_Node], e=None, usebounds=False, weight: str | None = None): ... @@ -15,3 +30,7 @@ def center(G: Graph[_Node], e=None, usebounds=False, weight: str | None = None): def barycenter(G, weight: str | None = None, attr=None, sp=None): ... @_dispatchable def resistance_distance(G: Graph[_Node], nodeA=None, nodeB=None, weight: str | None = None, invert_weight: bool = True): ... +@_dispatchable +def effective_graph_resistance(G, weight=None, invert_weight=True) -> float: ... +@_dispatchable +def kemeny_constant(G, *, weight=None) -> float: ... diff --git a/stubs/networkx/networkx/algorithms/distance_regular.pyi b/stubs/networkx/networkx/algorithms/distance_regular.pyi index 182d37110..616db02e9 100644 --- a/stubs/networkx/networkx/algorithms/distance_regular.pyi +++ b/stubs/networkx/networkx/algorithms/distance_regular.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["is_distance_regular", "is_strongly_regular", "intersection_array", "global_parameters"] + @_dispatchable def is_distance_regular(G: Graph[_Node]): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/dominance.pyi b/stubs/networkx/networkx/algorithms/dominance.pyi index cc431c676..76b3ed977 100644 --- a/stubs/networkx/networkx/algorithms/dominance.pyi +++ b/stubs/networkx/networkx/algorithms/dominance.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["immediate_dominators", "dominance_frontiers"] + @_dispatchable def immediate_dominators(G: Graph[_Node], start: _Node): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/dominating.pyi b/stubs/networkx/networkx/algorithms/dominating.pyi index 3786bb538..a1058271a 100644 --- a/stubs/networkx/networkx/algorithms/dominating.pyi +++ b/stubs/networkx/networkx/algorithms/dominating.pyi @@ -4,6 +4,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["dominating_set", "is_dominating_set"] + @_dispatchable def dominating_set(G: Graph[_Node], start_with: _Node | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/efficiency_measures.pyi b/stubs/networkx/networkx/algorithms/efficiency_measures.pyi index 420795a59..13369a99e 100644 --- a/stubs/networkx/networkx/algorithms/efficiency_measures.pyi +++ b/stubs/networkx/networkx/algorithms/efficiency_measures.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import _Node from networkx.utils.backends import _dispatchable +__all__ = ["efficiency", "local_efficiency", "global_efficiency"] + @_dispatchable def efficiency(G, u: _Node, v: _Node): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/euler.pyi b/stubs/networkx/networkx/algorithms/euler.pyi index 0e8552402..80f0d6e02 100644 --- a/stubs/networkx/networkx/algorithms/euler.pyi +++ b/stubs/networkx/networkx/algorithms/euler.pyi @@ -4,6 +4,8 @@ from collections.abc import Generator from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["is_eulerian", "eulerian_circuit", "eulerize", "is_semieulerian", "has_eulerian_path", "eulerian_path"] + @_dispatchable def is_eulerian(G: Graph[_Node]): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/flow/boykovkolmogorov.pyi b/stubs/networkx/networkx/algorithms/flow/boykovkolmogorov.pyi index 1389aac00..90a90d365 100644 --- a/stubs/networkx/networkx/algorithms/flow/boykovkolmogorov.pyi +++ b/stubs/networkx/networkx/algorithms/flow/boykovkolmogorov.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["boykov_kolmogorov"] + @_dispatchable def boykov_kolmogorov( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/flow/capacityscaling.pyi b/stubs/networkx/networkx/algorithms/flow/capacityscaling.pyi index 8f5b3bef3..13b7ad6da 100644 --- a/stubs/networkx/networkx/algorithms/flow/capacityscaling.pyi +++ b/stubs/networkx/networkx/algorithms/flow/capacityscaling.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["capacity_scaling"] + @_dispatchable def capacity_scaling( G: Graph[_Node], demand: str = "demand", capacity: str = "capacity", weight: str = "weight", heap: type = ... diff --git a/stubs/networkx/networkx/algorithms/flow/dinitz_alg.pyi b/stubs/networkx/networkx/algorithms/flow/dinitz_alg.pyi index bd4c8bb1b..03136846c 100644 --- a/stubs/networkx/networkx/algorithms/flow/dinitz_alg.pyi +++ b/stubs/networkx/networkx/algorithms/flow/dinitz_alg.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["dinitz"] + @_dispatchable def dinitz( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/flow/edmondskarp.pyi b/stubs/networkx/networkx/algorithms/flow/edmondskarp.pyi index 95fb8d5a3..c415d2432 100644 --- a/stubs/networkx/networkx/algorithms/flow/edmondskarp.pyi +++ b/stubs/networkx/networkx/algorithms/flow/edmondskarp.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["edmonds_karp"] + @_dispatchable def edmonds_karp( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/flow/mincost.pyi b/stubs/networkx/networkx/algorithms/flow/mincost.pyi index 86e0834f5..86c8e66dc 100644 --- a/stubs/networkx/networkx/algorithms/flow/mincost.pyi +++ b/stubs/networkx/networkx/algorithms/flow/mincost.pyi @@ -3,6 +3,8 @@ from _typeshed import Incomplete, SupportsGetItem from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["min_cost_flow_cost", "min_cost_flow", "cost_of_flow", "max_flow_min_cost"] + @_dispatchable def min_cost_flow_cost(G: Graph[_Node], demand: str = "demand", capacity: str = "capacity", weight: str = "weight"): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi b/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi index b9cf6bae5..c6028757f 100644 --- a/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi +++ b/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi @@ -4,6 +4,8 @@ from collections.abc import Generator from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["network_simplex"] + class _DataEssentialsAndFunctions: node_list: Incomplete node_indices: Incomplete diff --git a/stubs/networkx/networkx/algorithms/flow/preflowpush.pyi b/stubs/networkx/networkx/algorithms/flow/preflowpush.pyi index cd25f1cb0..e3f5b5bed 100644 --- a/stubs/networkx/networkx/algorithms/flow/preflowpush.pyi +++ b/stubs/networkx/networkx/algorithms/flow/preflowpush.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["preflow_push"] + @_dispatchable def preflow_push( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/flow/shortestaugmentingpath.pyi b/stubs/networkx/networkx/algorithms/flow/shortestaugmentingpath.pyi index 43b5ae4af..643baf509 100644 --- a/stubs/networkx/networkx/algorithms/flow/shortestaugmentingpath.pyi +++ b/stubs/networkx/networkx/algorithms/flow/shortestaugmentingpath.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["shortest_augmenting_path"] + @_dispatchable def shortest_augmenting_path( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/flow/utils.pyi b/stubs/networkx/networkx/algorithms/flow/utils.pyi index 3b041a5fc..0ae3a6bba 100644 --- a/stubs/networkx/networkx/algorithms/flow/utils.pyi +++ b/stubs/networkx/networkx/algorithms/flow/utils.pyi @@ -2,6 +2,8 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["CurrentEdge", "Level", "GlobalRelabelThreshold", "build_residual_network", "detect_unboundedness", "build_flow_dict"] + class CurrentEdge: def __init__(self, edges) -> None: ... def get(self): ... diff --git a/stubs/networkx/networkx/algorithms/graph_hashing.pyi b/stubs/networkx/networkx/algorithms/graph_hashing.pyi index 98b93f08f..7232060d5 100644 --- a/stubs/networkx/networkx/algorithms/graph_hashing.pyi +++ b/stubs/networkx/networkx/algorithms/graph_hashing.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["weisfeiler_lehman_graph_hash", "weisfeiler_lehman_subgraph_hashes"] + @_dispatchable def weisfeiler_lehman_graph_hash( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/graphical.pyi b/stubs/networkx/networkx/algorithms/graphical.pyi index 87c3a9068..54936da76 100644 --- a/stubs/networkx/networkx/algorithms/graphical.pyi +++ b/stubs/networkx/networkx/algorithms/graphical.pyi @@ -3,6 +3,15 @@ from collections.abc import Iterable from networkx.utils.backends import _dispatchable +__all__ = [ + "is_graphical", + "is_multigraphical", + "is_pseudographical", + "is_digraphical", + "is_valid_degree_sequence_erdos_gallai", + "is_valid_degree_sequence_havel_hakimi", +] + @_dispatchable def is_graphical(sequence: Iterable[Incomplete], method="eg"): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/hierarchy.pyi b/stubs/networkx/networkx/algorithms/hierarchy.pyi index e747ffc51..e982bfa88 100644 --- a/stubs/networkx/networkx/algorithms/hierarchy.pyi +++ b/stubs/networkx/networkx/algorithms/hierarchy.pyi @@ -1,4 +1,6 @@ from networkx.utils.backends import _dispatchable +__all__ = ["flow_hierarchy"] + @_dispatchable def flow_hierarchy(G, weight: str | None = None): ... diff --git a/stubs/networkx/networkx/algorithms/hybrid.pyi b/stubs/networkx/networkx/algorithms/hybrid.pyi index 171162022..5e1326905 100644 --- a/stubs/networkx/networkx/algorithms/hybrid.pyi +++ b/stubs/networkx/networkx/algorithms/hybrid.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["kl_connected_subgraph", "is_kl_connected"] + @_dispatchable def kl_connected_subgraph(G: Graph[_Node], k: int, l: int, low_memory: bool = False, same_as_graph: bool = False): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/isolate.pyi b/stubs/networkx/networkx/algorithms/isolate.pyi index d08ac5b19..4a5715d22 100644 --- a/stubs/networkx/networkx/algorithms/isolate.pyi +++ b/stubs/networkx/networkx/algorithms/isolate.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["is_isolate", "isolates", "number_of_isolates"] + @_dispatchable def is_isolate(G: Graph[_Node], n: _Node): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/isomorphism/ismags.pyi b/stubs/networkx/networkx/algorithms/isomorphism/ismags.pyi index 4a64a8191..e0dae00bd 100644 --- a/stubs/networkx/networkx/algorithms/isomorphism/ismags.pyi +++ b/stubs/networkx/networkx/algorithms/isomorphism/ismags.pyi @@ -1,6 +1,8 @@ from _typeshed import Incomplete from collections.abc import Generator +__all__ = ["ISMAGS"] + class ISMAGS: graph: Incomplete subgraph: Incomplete diff --git a/stubs/networkx/networkx/algorithms/isomorphism/matchhelpers.pyi b/stubs/networkx/networkx/algorithms/isomorphism/matchhelpers.pyi index aab135be0..2175fb430 100644 --- a/stubs/networkx/networkx/algorithms/isomorphism/matchhelpers.pyi +++ b/stubs/networkx/networkx/algorithms/isomorphism/matchhelpers.pyi @@ -2,6 +2,18 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = [ + "categorical_node_match", + "categorical_edge_match", + "categorical_multiedge_match", + "numerical_node_match", + "numerical_edge_match", + "numerical_multiedge_match", + "generic_node_match", + "generic_edge_match", + "generic_multiedge_match", +] + @_dispatchable def categorical_node_match(attr, default): ... diff --git a/stubs/networkx/networkx/algorithms/isomorphism/tree_isomorphism.pyi b/stubs/networkx/networkx/algorithms/isomorphism/tree_isomorphism.pyi index 5cfad7cd1..0497880a4 100644 --- a/stubs/networkx/networkx/algorithms/isomorphism/tree_isomorphism.pyi +++ b/stubs/networkx/networkx/algorithms/isomorphism/tree_isomorphism.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["rooted_tree_isomorphism", "tree_isomorphism"] + @_dispatchable def rooted_tree_isomorphism(t1, root1, t2, root2): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/isomorphism/vf2pp.pyi b/stubs/networkx/networkx/algorithms/isomorphism/vf2pp.pyi index 704bdcfc0..0ea2eff0b 100644 --- a/stubs/networkx/networkx/algorithms/isomorphism/vf2pp.pyi +++ b/stubs/networkx/networkx/algorithms/isomorphism/vf2pp.pyi @@ -5,6 +5,8 @@ from typing import NamedTuple from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["vf2pp_isomorphism", "vf2pp_is_isomorphic", "vf2pp_all_isomorphisms"] + class _GraphParameters(NamedTuple): G1: Incomplete G2: Incomplete diff --git a/stubs/networkx/networkx/algorithms/link_analysis/hits_alg.pyi b/stubs/networkx/networkx/algorithms/link_analysis/hits_alg.pyi index b91bc4610..c3bbba2ce 100644 --- a/stubs/networkx/networkx/algorithms/link_analysis/hits_alg.pyi +++ b/stubs/networkx/networkx/algorithms/link_analysis/hits_alg.pyi @@ -3,6 +3,8 @@ from _typeshed import Incomplete, SupportsGetItem from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["hits"] + @_dispatchable def hits( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/link_analysis/pagerank_alg.pyi b/stubs/networkx/networkx/algorithms/link_analysis/pagerank_alg.pyi index f79671d5c..93a97d20e 100644 --- a/stubs/networkx/networkx/algorithms/link_analysis/pagerank_alg.pyi +++ b/stubs/networkx/networkx/algorithms/link_analysis/pagerank_alg.pyi @@ -4,6 +4,8 @@ from collections.abc import Collection from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["pagerank", "google_matrix"] + @_dispatchable def pagerank( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/link_prediction.pyi b/stubs/networkx/networkx/algorithms/link_prediction.pyi index 6c298d3ca..9a9a815dc 100644 --- a/stubs/networkx/networkx/algorithms/link_prediction.pyi +++ b/stubs/networkx/networkx/algorithms/link_prediction.pyi @@ -1,6 +1,17 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = [ + "resource_allocation_index", + "jaccard_coefficient", + "adamic_adar_index", + "preferential_attachment", + "cn_soundarajan_hopcroft", + "ra_index_soundarajan_hopcroft", + "within_inter_cluster", + "common_neighbor_centrality", +] + @_dispatchable def resource_allocation_index(G: Graph[_Node], ebunch=None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/lowest_common_ancestors.pyi b/stubs/networkx/networkx/algorithms/lowest_common_ancestors.pyi index b884ed0cd..480a56cfd 100644 --- a/stubs/networkx/networkx/algorithms/lowest_common_ancestors.pyi +++ b/stubs/networkx/networkx/algorithms/lowest_common_ancestors.pyi @@ -5,6 +5,8 @@ from networkx.classes.digraph import DiGraph from networkx.classes.graph import _Node from networkx.utils.backends import _dispatchable +__all__ = ["all_pairs_lowest_common_ancestor", "tree_all_pairs_lowest_common_ancestor", "lowest_common_ancestor"] + @_dispatchable def all_pairs_lowest_common_ancestor(G: DiGraph[_Node], pairs=None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/matching.pyi b/stubs/networkx/networkx/algorithms/matching.pyi index cf7301679..4753abee8 100644 --- a/stubs/networkx/networkx/algorithms/matching.pyi +++ b/stubs/networkx/networkx/algorithms/matching.pyi @@ -1,6 +1,15 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = [ + "is_matching", + "is_maximal_matching", + "is_perfect_matching", + "max_weight_matching", + "min_weight_matching", + "maximal_matching", +] + @_dispatchable def maximal_matching(G: Graph[_Node]): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/minors/__init__.pyi b/stubs/networkx/networkx/algorithms/minors/__init__.pyi index e8f96f71a..746914c0b 100644 --- a/stubs/networkx/networkx/algorithms/minors/__init__.pyi +++ b/stubs/networkx/networkx/algorithms/minors/__init__.pyi @@ -5,3 +5,5 @@ from networkx.algorithms.minors.contraction import ( identified_nodes as identified_nodes, quotient_graph as quotient_graph, ) + +__all__ = ["contracted_edge", "contracted_nodes", "equivalence_classes", "identified_nodes", "quotient_graph"] diff --git a/stubs/networkx/networkx/algorithms/minors/contraction.pyi b/stubs/networkx/networkx/algorithms/minors/contraction.pyi index 40dc9a0ad..200e9f2fc 100644 --- a/stubs/networkx/networkx/algorithms/minors/contraction.pyi +++ b/stubs/networkx/networkx/algorithms/minors/contraction.pyi @@ -4,6 +4,8 @@ from collections.abc import Callable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["contracted_edge", "contracted_nodes", "equivalence_classes", "identified_nodes", "quotient_graph"] + @_dispatchable def equivalence_classes(iterable, relation): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/mis.pyi b/stubs/networkx/networkx/algorithms/mis.pyi index 66ec31517..bbe4abaeb 100644 --- a/stubs/networkx/networkx/algorithms/mis.pyi +++ b/stubs/networkx/networkx/algorithms/mis.pyi @@ -5,6 +5,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = ["maximal_independent_set"] + @_dispatchable def maximal_independent_set( G: Graph[_Node], nodes: Iterable[Incomplete] | None = None, seed: int | RandomState | None = None diff --git a/stubs/networkx/networkx/algorithms/moral.pyi b/stubs/networkx/networkx/algorithms/moral.pyi index 626c6c3f0..7727b2f68 100644 --- a/stubs/networkx/networkx/algorithms/moral.pyi +++ b/stubs/networkx/networkx/algorithms/moral.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["moral_graph"] + @_dispatchable def moral_graph(G: Graph[_Node]): ... diff --git a/stubs/networkx/networkx/algorithms/node_classification.pyi b/stubs/networkx/networkx/algorithms/node_classification.pyi index 45f0e4df7..8d5089104 100644 --- a/stubs/networkx/networkx/algorithms/node_classification.pyi +++ b/stubs/networkx/networkx/algorithms/node_classification.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["harmonic_function", "local_and_global_consistency"] + @_dispatchable def harmonic_function(G: Graph[_Node], max_iter: int = 30, label_name: str = "label"): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/non_randomness.pyi b/stubs/networkx/networkx/algorithms/non_randomness.pyi index fc1f04b00..b9b8f840a 100644 --- a/stubs/networkx/networkx/algorithms/non_randomness.pyi +++ b/stubs/networkx/networkx/algorithms/non_randomness.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["non_randomness"] + @_dispatchable def non_randomness(G: Graph[_Node], k: int | None = None, weight: str | None = "weight"): ... diff --git a/stubs/networkx/networkx/algorithms/operators/all.pyi b/stubs/networkx/networkx/algorithms/operators/all.pyi index 67e66bfcf..9816017a7 100644 --- a/stubs/networkx/networkx/algorithms/operators/all.pyi +++ b/stubs/networkx/networkx/algorithms/operators/all.pyi @@ -3,6 +3,8 @@ from collections.abc import Iterable from networkx.utils.backends import _dispatchable +__all__ = ["union_all", "compose_all", "disjoint_union_all", "intersection_all"] + @_dispatchable def union_all(graphs: Iterable[Incomplete], rename: Iterable[Incomplete] | None = ()): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/operators/binary.pyi b/stubs/networkx/networkx/algorithms/operators/binary.pyi index 7666bdbef..493b1762c 100644 --- a/stubs/networkx/networkx/algorithms/operators/binary.pyi +++ b/stubs/networkx/networkx/algorithms/operators/binary.pyi @@ -6,6 +6,8 @@ from networkx.classes.digraph import DiGraph from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["union", "compose", "disjoint_union", "intersection", "difference", "symmetric_difference", "full_join"] + @_dispatchable def disjoint_union(G: Graph[_Node], H: Graph[_Node]): ... @_dispatchable @@ -21,4 +23,6 @@ _Y_co = TypeVar("_Y_co", bound=Hashable, covariant=True) @_dispatchable def compose(G: Graph[_X_co], H: Graph[_Y_co]) -> DiGraph[_X_co | _Y_co]: ... @_dispatchable +def full_join(G, H, rename=(None, None)): ... +@_dispatchable def union(G: Graph[_X_co], H: Graph[_Y_co], rename: Iterable[Incomplete] | None = ()) -> DiGraph[_X_co | _Y_co]: ... diff --git a/stubs/networkx/networkx/algorithms/operators/product.pyi b/stubs/networkx/networkx/algorithms/operators/product.pyi index de12cd51b..ae3adbb54 100644 --- a/stubs/networkx/networkx/algorithms/operators/product.pyi +++ b/stubs/networkx/networkx/algorithms/operators/product.pyi @@ -1,3 +1,4 @@ +from _typeshed import Incomplete from collections.abc import Hashable from typing import TypeVar @@ -7,6 +8,17 @@ from networkx.utils.backends import _dispatchable _X = TypeVar("_X", bound=Hashable) _Y = TypeVar("_Y", bound=Hashable) +__all__ = [ + "tensor_product", + "cartesian_product", + "lexicographic_product", + "strong_product", + "power", + "rooted_product", + "corona_product", + "modular_product", +] + @_dispatchable def tensor_product(G: Graph[_X], H: Graph[_Y]) -> Graph[tuple[_X, _Y]]: ... @_dispatchable @@ -21,3 +33,5 @@ def power(G: Graph[_Node], k): ... def rooted_product(G: Graph[_X], H: Graph[_Y], root: _Y) -> Graph[tuple[_X, _Y]]: ... @_dispatchable def corona_product(G: Graph[_X], H: Graph[_Y]) -> Graph[tuple[_X, _Y]]: ... +@_dispatchable +def modular_product(G, H) -> Graph[Incomplete]: ... diff --git a/stubs/networkx/networkx/algorithms/operators/unary.pyi b/stubs/networkx/networkx/algorithms/operators/unary.pyi index cda8ebbf6..0a42c0133 100644 --- a/stubs/networkx/networkx/algorithms/operators/unary.pyi +++ b/stubs/networkx/networkx/algorithms/operators/unary.pyi @@ -6,6 +6,8 @@ from networkx.utils.backends import _dispatchable _G = TypeVar("_G", bound=Graph[Hashable]) +__all__ = ["complement", "reverse"] + @_dispatchable def complement(G: Graph[_Node]): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/planar_drawing.pyi b/stubs/networkx/networkx/algorithms/planar_drawing.pyi index 028c7aec2..197e912ec 100644 --- a/stubs/networkx/networkx/algorithms/planar_drawing.pyi +++ b/stubs/networkx/networkx/algorithms/planar_drawing.pyi @@ -1,4 +1,6 @@ from networkx.utils.backends import _dispatchable +__all__ = ["combinatorial_embedding_to_pos"] + @_dispatchable def combinatorial_embedding_to_pos(embedding, fully_triangulate: bool = False): ... diff --git a/stubs/networkx/networkx/algorithms/polynomials.pyi b/stubs/networkx/networkx/algorithms/polynomials.pyi index cadffc38a..9c40146e8 100644 --- a/stubs/networkx/networkx/algorithms/polynomials.pyi +++ b/stubs/networkx/networkx/algorithms/polynomials.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["tutte_polynomial", "chromatic_polynomial"] + @_dispatchable def tutte_polynomial(G: Graph[_Node]): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/reciprocity.pyi b/stubs/networkx/networkx/algorithms/reciprocity.pyi index 547dc885d..2208e9e00 100644 --- a/stubs/networkx/networkx/algorithms/reciprocity.pyi +++ b/stubs/networkx/networkx/algorithms/reciprocity.pyi @@ -3,6 +3,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["reciprocity", "overall_reciprocity"] + @_dispatchable def reciprocity(G: Graph[_Node], nodes: Iterable[_Node] | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/regular.pyi b/stubs/networkx/networkx/algorithms/regular.pyi index 61a19ea04..04d966f94 100644 --- a/stubs/networkx/networkx/algorithms/regular.pyi +++ b/stubs/networkx/networkx/algorithms/regular.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["is_regular", "is_k_regular", "k_factor"] + @_dispatchable def is_regular(G: Graph[_Node]): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/richclub.pyi b/stubs/networkx/networkx/algorithms/richclub.pyi index 2b7b8b21f..abf5cd680 100644 --- a/stubs/networkx/networkx/algorithms/richclub.pyi +++ b/stubs/networkx/networkx/algorithms/richclub.pyi @@ -2,5 +2,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = ["rich_club_coefficient"] + @_dispatchable def rich_club_coefficient(G: Graph[_Node], normalized: bool = True, Q: float = 100, seed: int | RandomState | None = None): ... diff --git a/stubs/networkx/networkx/algorithms/shortest_paths/astar.pyi b/stubs/networkx/networkx/algorithms/shortest_paths/astar.pyi index 63260ea30..0faccba54 100644 --- a/stubs/networkx/networkx/algorithms/shortest_paths/astar.pyi +++ b/stubs/networkx/networkx/algorithms/shortest_paths/astar.pyi @@ -5,6 +5,8 @@ from typing import Any from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["astar_path", "astar_path_length"] + @_dispatchable def astar_path( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/shortest_paths/dense.pyi b/stubs/networkx/networkx/algorithms/shortest_paths/dense.pyi index f40ce0ac0..ce3619331 100644 --- a/stubs/networkx/networkx/algorithms/shortest_paths/dense.pyi +++ b/stubs/networkx/networkx/algorithms/shortest_paths/dense.pyi @@ -4,6 +4,8 @@ from collections.abc import Collection from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["floyd_warshall", "floyd_warshall_predecessor_and_distance", "reconstruct_path", "floyd_warshall_numpy"] + @_dispatchable def floyd_warshall_numpy(G: Graph[_Node], nodelist: Collection[_Node] | None = None, weight: str | None = "weight"): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/shortest_paths/generic.pyi b/stubs/networkx/networkx/algorithms/shortest_paths/generic.pyi index f623aeb9e..0857f5602 100644 --- a/stubs/networkx/networkx/algorithms/shortest_paths/generic.pyi +++ b/stubs/networkx/networkx/algorithms/shortest_paths/generic.pyi @@ -5,6 +5,16 @@ from typing import overload from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = [ + "shortest_path", + "all_shortest_paths", + "single_source_all_shortest_paths", + "all_pairs_all_shortest_paths", + "shortest_path_length", + "average_shortest_path_length", + "has_path", +] + @_dispatchable def has_path(G: Graph[_Node], source: _Node, target: _Node) -> bool: ... @overload @@ -51,3 +61,11 @@ def all_shortest_paths( weight: str | Callable[..., Incomplete] | None = None, method: str | None = "dijkstra", ) -> Generator[list[_Node], None, None]: ... +@_dispatchable +def single_source_all_shortest_paths( + G, source, weight=None, method="dijkstra" +) -> Generator[tuple[Incomplete, list[list[Incomplete]]]]: ... +@_dispatchable +def all_pairs_all_shortest_paths( + G, weight=None, method="dijkstra" +) -> Generator[tuple[Incomplete, dict[Incomplete, Incomplete]]]: ... diff --git a/stubs/networkx/networkx/algorithms/shortest_paths/unweighted.pyi b/stubs/networkx/networkx/algorithms/shortest_paths/unweighted.pyi index 5e12a5322..7b5248b19 100644 --- a/stubs/networkx/networkx/algorithms/shortest_paths/unweighted.pyi +++ b/stubs/networkx/networkx/algorithms/shortest_paths/unweighted.pyi @@ -4,6 +4,17 @@ from collections.abc import Generator from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = [ + "bidirectional_shortest_path", + "single_source_shortest_path", + "single_source_shortest_path_length", + "single_target_shortest_path", + "single_target_shortest_path_length", + "all_pairs_shortest_path", + "all_pairs_shortest_path_length", + "predecessor", +] + @_dispatchable def single_source_shortest_path_length(G: Graph[_Node], source: _Node, cutoff: int | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/shortest_paths/weighted.pyi b/stubs/networkx/networkx/algorithms/shortest_paths/weighted.pyi index dd933aef9..28fb31c56 100644 --- a/stubs/networkx/networkx/algorithms/shortest_paths/weighted.pyi +++ b/stubs/networkx/networkx/algorithms/shortest_paths/weighted.pyi @@ -5,6 +5,34 @@ from typing import Any from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = [ + "dijkstra_path", + "dijkstra_path_length", + "bidirectional_dijkstra", + "single_source_dijkstra", + "single_source_dijkstra_path", + "single_source_dijkstra_path_length", + "multi_source_dijkstra", + "multi_source_dijkstra_path", + "multi_source_dijkstra_path_length", + "all_pairs_dijkstra", + "all_pairs_dijkstra_path", + "all_pairs_dijkstra_path_length", + "dijkstra_predecessor_and_distance", + "bellman_ford_path", + "bellman_ford_path_length", + "single_source_bellman_ford", + "single_source_bellman_ford_path", + "single_source_bellman_ford_path_length", + "all_pairs_bellman_ford_path", + "all_pairs_bellman_ford_path_length", + "bellman_ford_predecessor_and_distance", + "negative_edge_cycle", + "find_negative_cycle", + "goldberg_radzik", + "johnson", +] + @_dispatchable def dijkstra_path( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/similarity.pyi b/stubs/networkx/networkx/algorithms/similarity.pyi index 92164d71d..822a9e46d 100644 --- a/stubs/networkx/networkx/algorithms/similarity.pyi +++ b/stubs/networkx/networkx/algorithms/similarity.pyi @@ -5,6 +5,16 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = [ + "graph_edit_distance", + "optimal_edit_paths", + "optimize_graph_edit_distance", + "optimize_edit_paths", + "simrank_similarity", + "panther_similarity", + "generate_random_paths", +] + @_dispatchable def graph_edit_distance( G1: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/smallworld.pyi b/stubs/networkx/networkx/algorithms/smallworld.pyi index 1489f5619..665226a3d 100644 --- a/stubs/networkx/networkx/algorithms/smallworld.pyi +++ b/stubs/networkx/networkx/algorithms/smallworld.pyi @@ -2,6 +2,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = ["random_reference", "lattice_reference", "sigma", "omega"] + @_dispatchable def random_reference(G: Graph[_Node], niter: int = 1, connectivity: bool = True, seed: int | RandomState | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/smetric.pyi b/stubs/networkx/networkx/algorithms/smetric.pyi index ee2e7115e..e1cf4fd25 100644 --- a/stubs/networkx/networkx/algorithms/smetric.pyi +++ b/stubs/networkx/networkx/algorithms/smetric.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["s_metric"] + @_dispatchable def s_metric(G: Graph[_Node]): ... diff --git a/stubs/networkx/networkx/algorithms/sparsifiers.pyi b/stubs/networkx/networkx/algorithms/sparsifiers.pyi index e2c456c9c..67670ddcc 100644 --- a/stubs/networkx/networkx/algorithms/sparsifiers.pyi +++ b/stubs/networkx/networkx/algorithms/sparsifiers.pyi @@ -2,5 +2,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = ["spanner"] + @_dispatchable def spanner(G: Graph[_Node], stretch: float, weight: str | None = None, seed: int | RandomState | None = None): ... diff --git a/stubs/networkx/networkx/algorithms/structuralholes.pyi b/stubs/networkx/networkx/algorithms/structuralholes.pyi index 76e026c44..8d1519350 100644 --- a/stubs/networkx/networkx/algorithms/structuralholes.pyi +++ b/stubs/networkx/networkx/algorithms/structuralholes.pyi @@ -4,6 +4,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["constraint", "local_constraint", "effective_size"] + @_dispatchable def effective_size(G: Graph[_Node], nodes: Iterable[Incomplete] | None = None, weight: str | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/summarization.pyi b/stubs/networkx/networkx/algorithms/summarization.pyi index 051169966..db044b927 100644 --- a/stubs/networkx/networkx/algorithms/summarization.pyi +++ b/stubs/networkx/networkx/algorithms/summarization.pyi @@ -4,6 +4,8 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["dedensify", "snap_aggregation"] + @_dispatchable def dedensify(G: Graph[_Node], threshold: int, prefix=None, copy: bool | None = True): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/swap.pyi b/stubs/networkx/networkx/algorithms/swap.pyi index 006bb38c9..529b895d6 100644 --- a/stubs/networkx/networkx/algorithms/swap.pyi +++ b/stubs/networkx/networkx/algorithms/swap.pyi @@ -3,6 +3,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = ["double_edge_swap", "connected_double_edge_swap", "directed_edge_swap"] + @_dispatchable def directed_edge_swap(G: DiGraph[_Node], *, nswap: int = 1, max_tries: int = 100, seed: int | RandomState | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/threshold.pyi b/stubs/networkx/networkx/algorithms/threshold.pyi index 8a06957f8..d92695ec4 100644 --- a/stubs/networkx/networkx/algorithms/threshold.pyi +++ b/stubs/networkx/networkx/algorithms/threshold.pyi @@ -1,6 +1,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["is_threshold_graph", "find_threshold_graph"] + @_dispatchable def is_threshold_graph(G: Graph[_Node]): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/time_dependent.pyi b/stubs/networkx/networkx/algorithms/time_dependent.pyi index 4a77f32bb..554159d1d 100644 --- a/stubs/networkx/networkx/algorithms/time_dependent.pyi +++ b/stubs/networkx/networkx/algorithms/time_dependent.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["cd_index"] + @_dispatchable def cd_index(G: Graph[_Node], node: _Node, time_delta, *, time: str = "time", weight: str | None = None): ... diff --git a/stubs/networkx/networkx/algorithms/tournament.pyi b/stubs/networkx/networkx/algorithms/tournament.pyi index 9d92b1a46..f80e6e5b9 100644 --- a/stubs/networkx/networkx/algorithms/tournament.pyi +++ b/stubs/networkx/networkx/algorithms/tournament.pyi @@ -2,6 +2,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = ["hamiltonian_path", "is_reachable", "is_strongly_connected", "is_tournament", "random_tournament", "score_sequence"] + @_dispatchable def is_tournament(G: Graph[_Node]): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/traversal/beamsearch.pyi b/stubs/networkx/networkx/algorithms/traversal/beamsearch.pyi index 7040e297b..50b393fdd 100644 --- a/stubs/networkx/networkx/algorithms/traversal/beamsearch.pyi +++ b/stubs/networkx/networkx/algorithms/traversal/beamsearch.pyi @@ -4,6 +4,8 @@ from collections.abc import Callable, Generator from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["bfs_beam_edges"] + @_dispatchable def bfs_beam_edges( G: Graph[_Node], source: _Node, value: Callable[..., Incomplete], width: int | None = None diff --git a/stubs/networkx/networkx/algorithms/traversal/breadth_first_search.pyi b/stubs/networkx/networkx/algorithms/traversal/breadth_first_search.pyi index 9832210f2..226ebaaa0 100644 --- a/stubs/networkx/networkx/algorithms/traversal/breadth_first_search.pyi +++ b/stubs/networkx/networkx/algorithms/traversal/breadth_first_search.pyi @@ -1,9 +1,23 @@ from _typeshed import Incomplete from collections.abc import Callable, Generator +from typing import Literal from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = [ + "bfs_edges", + "bfs_tree", + "bfs_predecessors", + "bfs_successors", + "descendants_at_distance", + "bfs_layers", + "bfs_labeled_edges", + "generic_bfs_edges", +] + +@_dispatchable +def generic_bfs_edges(G, source, neighbors=None, depth_limit=None) -> Generator[tuple[Incomplete, Incomplete]]: ... @_dispatchable def bfs_edges( G: Graph[_Node], @@ -31,4 +45,6 @@ def bfs_successors( @_dispatchable def bfs_layers(G: Graph[_Node], sources) -> Generator[Incomplete, None, None]: ... @_dispatchable +def bfs_labeled_edges(G, sources) -> Generator[tuple[Incomplete, Incomplete, Literal["tree", "level", "forward", "reverse"]]]: ... +@_dispatchable def descendants_at_distance(G: Graph[_Node], source, distance): ... diff --git a/stubs/networkx/networkx/algorithms/traversal/depth_first_search.pyi b/stubs/networkx/networkx/algorithms/traversal/depth_first_search.pyi index b4f3e1bc0..f66eee33c 100644 --- a/stubs/networkx/networkx/algorithms/traversal/depth_first_search.pyi +++ b/stubs/networkx/networkx/algorithms/traversal/depth_first_search.pyi @@ -4,6 +4,16 @@ from collections.abc import Callable, Generator from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = [ + "dfs_edges", + "dfs_tree", + "dfs_predecessors", + "dfs_successors", + "dfs_preorder_nodes", + "dfs_postorder_nodes", + "dfs_labeled_edges", +] + @_dispatchable def dfs_edges( G: Graph[_Node], source: _Node | None = None, depth_limit=None, *, sort_neighbors: Callable[..., Incomplete] | None = None diff --git a/stubs/networkx/networkx/algorithms/traversal/edgebfs.pyi b/stubs/networkx/networkx/algorithms/traversal/edgebfs.pyi index 1829e0bbe..19c0db4ef 100644 --- a/stubs/networkx/networkx/algorithms/traversal/edgebfs.pyi +++ b/stubs/networkx/networkx/algorithms/traversal/edgebfs.pyi @@ -4,5 +4,7 @@ from collections.abc import Generator from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["edge_bfs"] + @_dispatchable def edge_bfs(G: Graph[_Node], source=None, orientation=None) -> Generator[Incomplete, None, Incomplete]: ... diff --git a/stubs/networkx/networkx/algorithms/traversal/edgedfs.pyi b/stubs/networkx/networkx/algorithms/traversal/edgedfs.pyi index 3e8b6485f..d46c0229d 100644 --- a/stubs/networkx/networkx/algorithms/traversal/edgedfs.pyi +++ b/stubs/networkx/networkx/algorithms/traversal/edgedfs.pyi @@ -4,5 +4,7 @@ from collections.abc import Generator from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["edge_dfs"] + @_dispatchable def edge_dfs(G: Graph[_Node], source=None, orientation=None) -> Generator[Incomplete, None, Incomplete]: ... diff --git a/stubs/networkx/networkx/algorithms/tree/branchings.pyi b/stubs/networkx/networkx/algorithms/tree/branchings.pyi index 00a09bdaf..f04b808be 100644 --- a/stubs/networkx/networkx/algorithms/tree/branchings.pyi +++ b/stubs/networkx/networkx/algorithms/tree/branchings.pyi @@ -12,6 +12,7 @@ __all__ = [ "greedy_branching", "maximum_branching", "minimum_branching", + "minimal_branching", "maximum_spanning_arborescence", "minimum_spanning_arborescence", "ArborescenceIterator", @@ -32,6 +33,8 @@ def minimum_branching( G: DiGraph[_Node], attr: str = "weight", default: float = 1, preserve_attrs: bool = False, partition: str | None = None ): ... @_dispatchable +def minimal_branching(G, /, *, attr="weight", default=1, preserve_attrs=False, partition=None): ... +@_dispatchable def maximum_spanning_arborescence( G: DiGraph[_Node], attr: str = "weight", default: float = 1, preserve_attrs: bool = False, partition: str | None = None ): ... diff --git a/stubs/networkx/networkx/algorithms/tree/coding.pyi b/stubs/networkx/networkx/algorithms/tree/coding.pyi index 14906e0ba..afd2ee79e 100644 --- a/stubs/networkx/networkx/algorithms/tree/coding.pyi +++ b/stubs/networkx/networkx/algorithms/tree/coding.pyi @@ -5,6 +5,8 @@ from networkx.classes.graph import Graph, _Node from networkx.exception import NetworkXException from networkx.utils.backends import _dispatchable +__all__ = ["from_nested_tuple", "from_prufer_sequence", "NotATree", "to_nested_tuple", "to_prufer_sequence"] + class NotATree(NetworkXException): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/tree/decomposition.pyi b/stubs/networkx/networkx/algorithms/tree/decomposition.pyi index 998d6241c..798894429 100644 --- a/stubs/networkx/networkx/algorithms/tree/decomposition.pyi +++ b/stubs/networkx/networkx/algorithms/tree/decomposition.pyi @@ -1,4 +1,6 @@ from networkx.utils.backends import _dispatchable +__all__ = ["junction_tree"] + @_dispatchable def junction_tree(G): ... diff --git a/stubs/networkx/networkx/algorithms/tree/mst.pyi b/stubs/networkx/networkx/algorithms/tree/mst.pyi index 2a55ed99c..5cd518995 100644 --- a/stubs/networkx/networkx/algorithms/tree/mst.pyi +++ b/stubs/networkx/networkx/algorithms/tree/mst.pyi @@ -2,11 +2,24 @@ from _typeshed import Incomplete from collections.abc import Iterator from dataclasses import dataclass from enum import Enum +from typing import Literal from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = [ + "minimum_spanning_edges", + "maximum_spanning_edges", + "minimum_spanning_tree", + "maximum_spanning_tree", + "number_of_spanning_trees", + "random_spanning_tree", + "partition_spanning_tree", + "EdgePartition", + "SpanningTreeIterator", +] + class EdgePartition(Enum): OPEN = 0 INCLUDED = 1 @@ -60,3 +73,6 @@ class SpanningTreeIterator: def __iter__(self) -> Iterator[Incomplete]: ... def __next__(self): ... + +@_dispatchable +def number_of_spanning_trees(G, *, root=None, weight=None) -> float | Literal[0]: ... diff --git a/stubs/networkx/networkx/algorithms/tree/operations.pyi b/stubs/networkx/networkx/algorithms/tree/operations.pyi index a88e48eca..0388ce40d 100644 --- a/stubs/networkx/networkx/algorithms/tree/operations.pyi +++ b/stubs/networkx/networkx/algorithms/tree/operations.pyi @@ -3,5 +3,7 @@ from collections.abc import Iterable from networkx.utils.backends import _dispatchable +__all__ = ["join_trees"] + @_dispatchable def join_trees(rooted_trees: Iterable[Incomplete], *, label_attribute: str | None = None, first_label: int | None = 0): ... diff --git a/stubs/networkx/networkx/algorithms/tree/recognition.pyi b/stubs/networkx/networkx/algorithms/tree/recognition.pyi index 219e48d02..efacca7c5 100644 --- a/stubs/networkx/networkx/algorithms/tree/recognition.pyi +++ b/stubs/networkx/networkx/algorithms/tree/recognition.pyi @@ -2,6 +2,8 @@ from networkx.classes.digraph import DiGraph from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["is_arborescence", "is_branching", "is_forest", "is_tree"] + @_dispatchable def is_arborescence(G: Graph[_Node]): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/triads.pyi b/stubs/networkx/networkx/algorithms/triads.pyi index 1942e68f9..8c0c61034 100644 --- a/stubs/networkx/networkx/algorithms/triads.pyi +++ b/stubs/networkx/networkx/algorithms/triads.pyi @@ -6,6 +6,8 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable from numpy.random import RandomState +__all__ = ["triadic_census", "is_triad", "all_triplets", "all_triads", "triads_by_type", "triad_type", "random_triad"] + @_dispatchable def triadic_census(G: DiGraph[_Node], nodelist: Collection[_Node] | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/vitality.pyi b/stubs/networkx/networkx/algorithms/vitality.pyi index ec105de8f..a9b84a11c 100644 --- a/stubs/networkx/networkx/algorithms/vitality.pyi +++ b/stubs/networkx/networkx/algorithms/vitality.pyi @@ -3,6 +3,8 @@ from _typeshed import Incomplete from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["closeness_vitality"] + @_dispatchable def closeness_vitality( G: Graph[_Node], node: Incomplete | None = None, weight: str | None = None, wiener_index: float | None = None diff --git a/stubs/networkx/networkx/algorithms/voronoi.pyi b/stubs/networkx/networkx/algorithms/voronoi.pyi index 806b4b126..cd21b3d0c 100644 --- a/stubs/networkx/networkx/algorithms/voronoi.pyi +++ b/stubs/networkx/networkx/algorithms/voronoi.pyi @@ -5,6 +5,8 @@ from typing import Any from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["voronoi_cells"] + @_dispatchable def voronoi_cells( G: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/walks.pyi b/stubs/networkx/networkx/algorithms/walks.pyi index 9c5d25a38..7e296bd51 100644 --- a/stubs/networkx/networkx/algorithms/walks.pyi +++ b/stubs/networkx/networkx/algorithms/walks.pyi @@ -1,5 +1,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["number_of_walks"] + @_dispatchable def number_of_walks(G: Graph[_Node], walk_length: int): ... diff --git a/stubs/networkx/networkx/algorithms/wiener.pyi b/stubs/networkx/networkx/algorithms/wiener.pyi index e55f89020..87e87f305 100644 --- a/stubs/networkx/networkx/algorithms/wiener.pyi +++ b/stubs/networkx/networkx/algorithms/wiener.pyi @@ -1,5 +1,11 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable +__all__ = ["wiener_index", "schultz_index", "gutman_index"] + @_dispatchable def wiener_index(G: Graph[_Node], weight: str | None = None): ... +@_dispatchable +def schultz_index(G, weight=None) -> float: ... +@_dispatchable +def gutman_index(G, weight=None) -> float: ... diff --git a/stubs/networkx/networkx/classes/coreviews.pyi b/stubs/networkx/networkx/classes/coreviews.pyi index 5c10338c6..286c7db65 100644 --- a/stubs/networkx/networkx/classes/coreviews.pyi +++ b/stubs/networkx/networkx/classes/coreviews.pyi @@ -6,6 +6,20 @@ _T = TypeVar("_T") _U = TypeVar("_U") _V = TypeVar("_V") +__all__ = [ + "AtlasView", + "AdjacencyView", + "MultiAdjacencyView", + "UnionAtlas", + "UnionAdjacency", + "UnionMultiInner", + "UnionMultiAdjacency", + "FilterAtlas", + "FilterAdjacency", + "FilterMultiInner", + "FilterMultiAdjacency", +] + class AtlasView(Mapping[_T, dict[_U, _V]]): def __getstate__(self) -> dict[str, Mapping[_T, dict[_U, _V]]]: ... def __setstate__(self, state: dict[str, Mapping[_T, dict[_U, _V]]]) -> None: ... diff --git a/stubs/networkx/networkx/classes/digraph.pyi b/stubs/networkx/networkx/classes/digraph.pyi index 2c3476e70..281da1a62 100644 --- a/stubs/networkx/networkx/classes/digraph.pyi +++ b/stubs/networkx/networkx/classes/digraph.pyi @@ -6,6 +6,8 @@ from networkx.classes.coreviews import AdjacencyView from networkx.classes.graph import Graph, _Node from networkx.classes.reportviews import DiDegreeView, OutEdgeView +__all__ = ["DiGraph"] + class DiGraph(Graph[_Node]): @cached_property def succ(self) -> AdjacencyView[_Node, _Node, dict[str, Incomplete]]: ... diff --git a/stubs/networkx/networkx/classes/filters.pyi b/stubs/networkx/networkx/classes/filters.pyi index 0d8e26af8..c8689991e 100644 --- a/stubs/networkx/networkx/classes/filters.pyi +++ b/stubs/networkx/networkx/classes/filters.pyi @@ -1,5 +1,19 @@ from _typeshed import Incomplete +__all__ = [ + "no_filter", + "hide_nodes", + "hide_edges", + "hide_multiedges", + "hide_diedges", + "hide_multidiedges", + "show_nodes", + "show_edges", + "show_multiedges", + "show_diedges", + "show_multidiedges", +] + def no_filter(*items): ... def hide_nodes(nodes): ... def hide_diedges(edges): ... diff --git a/stubs/networkx/networkx/classes/function.pyi b/stubs/networkx/networkx/classes/function.pyi index 459cd8baa..aa2d8623a 100644 --- a/stubs/networkx/networkx/classes/function.pyi +++ b/stubs/networkx/networkx/classes/function.pyi @@ -32,8 +32,10 @@ __all__ = [ "create_empty_copy", "set_node_attributes", "get_node_attributes", + "remove_node_attributes", "set_edge_attributes", "get_edge_attributes", + "remove_edge_attributes", "all_neighbors", "non_neighbors", "non_edges", @@ -47,6 +49,7 @@ __all__ = [ "path_weight", "is_path", ] + _U = TypeVar("_U") def nodes(G): ... @@ -86,6 +89,7 @@ def set_node_attributes( name: None = None, ) -> None: ... def get_node_attributes(G: Graph[_Node], name: str, default=None) -> dict[_Node, Incomplete]: ... +def remove_node_attributes(G, *attr_names, nbunch=None) -> None: ... @overload def set_edge_attributes(G: Graph[_Node], values: SupportsItems[tuple[_Node, _Node], Incomplete], name: str) -> None: ... @overload @@ -93,6 +97,7 @@ def set_edge_attributes(G: MultiGraph[_Node], values: dict[tuple[_Node, _Node, I @overload def set_edge_attributes(G: Graph[Hashable], values, name: None = None) -> None: ... def get_edge_attributes(G: Graph[_Node], name: str, default=None) -> dict[tuple[_Node, _Node], Incomplete]: ... +def remove_edge_attributes(G, *attr_names, ebunch=None) -> None: ... def all_neighbors(graph: Graph[_Node], node: _Node) -> Iterator[_Node]: ... def non_neighbors(graph: Graph[_Node], node: _Node) -> Generator[_Node, None, None]: ... def non_edges(graph: Graph[_Node]) -> Generator[tuple[_Node, _Node], None, None]: ... diff --git a/stubs/networkx/networkx/classes/graph.pyi b/stubs/networkx/networkx/classes/graph.pyi index 981d61fd0..5fda0dcc5 100644 --- a/stubs/networkx/networkx/classes/graph.pyi +++ b/stubs/networkx/networkx/classes/graph.pyi @@ -26,6 +26,8 @@ _Data: TypeAlias = ( # | scipy.sparse.base.spmatrix ) +__all__ = ["Graph"] + class Graph(Collection[_Node]): node_dict_factory: ClassVar[_MapFactory] = ... node_attr_dict_factory: ClassVar[_MapFactory] = ... diff --git a/stubs/networkx/networkx/classes/graphviews.pyi b/stubs/networkx/networkx/classes/graphviews.pyi index 798eed572..460e2df05 100644 --- a/stubs/networkx/networkx/classes/graphviews.pyi +++ b/stubs/networkx/networkx/classes/graphviews.pyi @@ -9,6 +9,8 @@ from networkx.classes.multigraph import MultiGraph _G = TypeVar("_G", bound=Graph[Hashable]) _D = TypeVar("_D", bound=DiGraph[Hashable]) +__all__ = ["generic_graph_view", "subgraph_view", "reverse_view"] + @overload def generic_graph_view(G: _G, create_using: None = None) -> _G: ... @overload diff --git a/stubs/networkx/networkx/classes/multidigraph.pyi b/stubs/networkx/networkx/classes/multidigraph.pyi index ebfe40bc2..0bf2f2fe8 100644 --- a/stubs/networkx/networkx/classes/multidigraph.pyi +++ b/stubs/networkx/networkx/classes/multidigraph.pyi @@ -7,6 +7,8 @@ from networkx.classes.graph import _Node from networkx.classes.multigraph import MultiGraph from networkx.classes.reportviews import InMultiDegreeView, OutMultiDegreeView, OutMultiEdgeView +__all__ = ["MultiDiGraph"] + class MultiDiGraph(MultiGraph[_Node], DiGraph[_Node]): @cached_property def succ(self) -> MultiAdjacencyView[_Node, _Node, dict[str, Incomplete]]: ... diff --git a/stubs/networkx/networkx/classes/multigraph.pyi b/stubs/networkx/networkx/classes/multigraph.pyi index f6b7766cc..63b159ad0 100644 --- a/stubs/networkx/networkx/classes/multigraph.pyi +++ b/stubs/networkx/networkx/classes/multigraph.pyi @@ -9,6 +9,8 @@ from networkx.classes.reportviews import OutMultiEdgeView _MultiEdge: TypeAlias = tuple[_Node, _Node, int] # noqa: Y047 +__all__ = ["MultiGraph"] + class MultiGraph(Graph[_Node]): def __init__(self, incoming_graph_data: Incomplete | None = None, multigraph_input: bool | None = None, **attr) -> None: ... @cached_property diff --git a/stubs/networkx/networkx/classes/reportviews.pyi b/stubs/networkx/networkx/classes/reportviews.pyi index 6a654dccc..2a2a5c6d7 100644 --- a/stubs/networkx/networkx/classes/reportviews.pyi +++ b/stubs/networkx/networkx/classes/reportviews.pyi @@ -9,6 +9,31 @@ from networkx.classes.graph import Graph, _Edge, _NBunch, _Node _D = TypeVar("_D") _U = TypeVar("_U") +__all__ = [ + "NodeView", + "NodeDataView", + "EdgeView", + "OutEdgeView", + "InEdgeView", + "EdgeDataView", + "OutEdgeDataView", + "InEdgeDataView", + "MultiEdgeView", + "OutMultiEdgeView", + "InMultiEdgeView", + "MultiEdgeDataView", + "OutMultiEdgeDataView", + "InMultiEdgeDataView", + "DegreeView", + "DiDegreeView", + "InDegreeView", + "OutDegreeView", + "MultiDegreeView", + "DiMultiDegreeView", + "InMultiDegreeView", + "OutMultiDegreeView", +] + class NodeView(Mapping[_Node, dict[str, Any]], AbstractSet[_Node]): def __init__(self, graph: Graph[_Node]) -> None: ... def __len__(self) -> int: ... diff --git a/stubs/networkx/networkx/convert_matrix.pyi b/stubs/networkx/networkx/convert_matrix.pyi index a94e00e7a..2cc8aab6e 100644 --- a/stubs/networkx/networkx/convert_matrix.pyi +++ b/stubs/networkx/networkx/convert_matrix.pyi @@ -17,6 +17,17 @@ _ExtensionDtype: TypeAlias = Incomplete _Axes: TypeAlias = Collection[_Node] _G = TypeVar("_G", bound=Graph[Hashable]) +__all__ = [ + "from_pandas_adjacency", + "to_pandas_adjacency", + "from_pandas_edgelist", + "to_pandas_edgelist", + "from_scipy_sparse_array", + "to_scipy_sparse_array", + "from_numpy_array", + "to_numpy_array", +] + @_dispatchable def to_pandas_adjacency( G: Graph[_Node], @@ -69,6 +80,10 @@ def from_pandas_edgelist( edge_key: str | None = None, ) -> Graph[Incomplete]: ... @_dispatchable +def to_scipy_sparse_array(G, nodelist=None, dtype=None, weight="weight", format="csr"): ... +@_dispatchable +def from_scipy_sparse_array(A, parallel_edges=False, create_using=None, edge_attribute="weight"): ... +@_dispatchable def to_numpy_array( G: Graph[_Node], nodelist: Collection[_Node] | None = None, diff --git a/stubs/networkx/networkx/drawing/layout.pyi b/stubs/networkx/networkx/drawing/layout.pyi index 8d5f3dd1d..fae316ed4 100644 --- a/stubs/networkx/networkx/drawing/layout.pyi +++ b/stubs/networkx/networkx/drawing/layout.pyi @@ -2,6 +2,25 @@ from _typeshed import Incomplete import numpy +__all__ = [ + "bipartite_layout", + "circular_layout", + "forceatlas2_layout", + "kamada_kawai_layout", + "random_layout", + "rescale_layout", + "rescale_layout_dict", + "shell_layout", + "spring_layout", + "spectral_layout", + "planar_layout", + "fruchterman_reingold_layout", + "spiral_layout", + "multipartite_layout", + "bfs_layout", + "arf_layout", +] + def random_layout(G, center: Incomplete | None = None, dim: int = 2, seed: Incomplete | None = None): ... def circular_layout(G, scale: float = 1, center: Incomplete | None = None, dim: int = 2): ... def shell_layout( @@ -59,5 +78,24 @@ def arf_layout( *, seed: int | numpy.random.RandomState | None = None, ): ... +def forceatlas2_layout( + G, + pos=None, + *, + max_iter=100, + jitter_tolerance=1.0, + scaling_ratio=2.0, + gravity=1.0, + distributed_action=False, + strong_gravity=False, + node_mass=None, + node_size=None, + weight=None, + dissuade_hubs=False, + linlog=False, + seed=None, + dim=2, +) -> dict[Incomplete, Incomplete]: ... def rescale_layout(pos, scale: float = 1): ... def rescale_layout_dict(pos, scale: float = 1): ... +def bfs_layout(G, start, *, align="vertical", scale=1, center=None) -> dict[Incomplete, Incomplete]: ... diff --git a/stubs/networkx/networkx/drawing/nx_agraph.pyi b/stubs/networkx/networkx/drawing/nx_agraph.pyi index 025489a57..0c744f10e 100644 --- a/stubs/networkx/networkx/drawing/nx_agraph.pyi +++ b/stubs/networkx/networkx/drawing/nx_agraph.pyi @@ -9,6 +9,8 @@ from networkx.utils.backends import _dispatchable # from pygraphviz.agraph import AGraph as _AGraph _AGraph: TypeAlias = Incomplete +__all__ = ["from_agraph", "to_agraph", "write_dot", "read_dot", "graphviz_layout", "pygraphviz_layout", "view_pygraphviz"] + @_dispatchable def from_agraph(A, create_using: Incomplete | None = None) -> Graph[Incomplete]: ... def to_agraph(N: Graph[Hashable]) -> _AGraph: ... diff --git a/stubs/networkx/networkx/drawing/nx_latex.pyi b/stubs/networkx/networkx/drawing/nx_latex.pyi index ae19dd148..a7ca26c18 100644 --- a/stubs/networkx/networkx/drawing/nx_latex.pyi +++ b/stubs/networkx/networkx/drawing/nx_latex.pyi @@ -1,5 +1,7 @@ from _typeshed import Incomplete +__all__ = ["to_latex_raw", "to_latex", "write_latex"] + def to_latex_raw( G, pos: str = "pos", diff --git a/stubs/networkx/networkx/drawing/nx_pydot.pyi b/stubs/networkx/networkx/drawing/nx_pydot.pyi index 0d8a59e90..dbb039f03 100644 --- a/stubs/networkx/networkx/drawing/nx_pydot.pyi +++ b/stubs/networkx/networkx/drawing/nx_pydot.pyi @@ -2,6 +2,8 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["write_dot", "read_dot", "graphviz_layout", "pydot_layout", "to_pydot", "from_pydot"] + def write_dot(G, path) -> None: ... @_dispatchable def read_dot(path): ... diff --git a/stubs/networkx/networkx/drawing/nx_pylab.pyi b/stubs/networkx/networkx/drawing/nx_pylab.pyi index cb530376b..9ed051b67 100644 --- a/stubs/networkx/networkx/drawing/nx_pylab.pyi +++ b/stubs/networkx/networkx/drawing/nx_pylab.pyi @@ -1,6 +1,23 @@ from _typeshed import Incomplete from collections.abc import Collection +__all__ = [ + "draw", + "draw_networkx", + "draw_networkx_nodes", + "draw_networkx_edges", + "draw_networkx_labels", + "draw_networkx_edge_labels", + "draw_circular", + "draw_kamada_kawai", + "draw_random", + "draw_spectral", + "draw_spring", + "draw_planar", + "draw_shell", + "draw_forceatlas2", +] + def draw(G, pos: Incomplete | None = None, ax: Incomplete | None = None, **kwds) -> None: ... def draw_networkx( G, pos: Incomplete | None = None, arrows: Incomplete | None = None, with_labels: bool = True, **kwds @@ -91,3 +108,4 @@ def draw_spectral(G, **kwargs) -> None: ... def draw_spring(G, **kwargs) -> None: ... def draw_shell(G, nlist: Incomplete | None = None, **kwargs) -> None: ... def draw_planar(G, **kwargs) -> None: ... +def draw_forceatlas2(G, **kwargs) -> None: ... diff --git a/stubs/networkx/networkx/exception.pyi b/stubs/networkx/networkx/exception.pyi index ab6a0e2e0..c1ebc86ee 100644 --- a/stubs/networkx/networkx/exception.pyi +++ b/stubs/networkx/networkx/exception.pyi @@ -1,3 +1,20 @@ +__all__ = [ + "HasACycle", + "NodeNotFound", + "PowerIterationFailedConvergence", + "ExceededMaxIterations", + "AmbiguousSolution", + "NetworkXAlgorithmError", + "NetworkXException", + "NetworkXError", + "NetworkXNoCycle", + "NetworkXNoPath", + "NetworkXNotImplemented", + "NetworkXPointlessConcept", + "NetworkXUnbounded", + "NetworkXUnfeasible", +] + class NetworkXException(Exception): ... class NetworkXError(NetworkXException): ... class NetworkXPointlessConcept(NetworkXException): ... diff --git a/stubs/networkx/networkx/generators/atlas.pyi b/stubs/networkx/networkx/generators/atlas.pyi index f97cf915b..4fffc13ca 100644 --- a/stubs/networkx/networkx/generators/atlas.pyi +++ b/stubs/networkx/networkx/generators/atlas.pyi @@ -1,5 +1,7 @@ from networkx.utils.backends import _dispatchable +__all__ = ["graph_atlas", "graph_atlas_g"] + @_dispatchable def graph_atlas(i): ... @_dispatchable diff --git a/stubs/networkx/networkx/generators/classic.pyi b/stubs/networkx/networkx/generators/classic.pyi index b35c8b4ad..99b8a6d84 100644 --- a/stubs/networkx/networkx/generators/classic.pyi +++ b/stubs/networkx/networkx/generators/classic.pyi @@ -1,10 +1,37 @@ from _typeshed import Incomplete +from networkx.classes import Graph from networkx.utils.backends import _dispatchable +__all__ = [ + "balanced_tree", + "barbell_graph", + "binomial_tree", + "complete_graph", + "complete_multipartite_graph", + "circular_ladder_graph", + "circulant_graph", + "cycle_graph", + "dorogovtsev_goltsev_mendes_graph", + "empty_graph", + "full_rary_tree", + "kneser_graph", + "ladder_graph", + "lollipop_graph", + "null_graph", + "path_graph", + "star_graph", + "tadpole_graph", + "trivial_graph", + "turan_graph", + "wheel_graph", +] + @_dispatchable def full_rary_tree(r, n, create_using: Incomplete | None = None): ... @_dispatchable +def kneser_graph(n, k) -> Graph[Incomplete]: ... +@_dispatchable def balanced_tree(r, h, create_using: Incomplete | None = None): ... @_dispatchable def barbell_graph(m1, m2, create_using: Incomplete | None = None): ... @@ -33,6 +60,8 @@ def path_graph(n, create_using: Incomplete | None = None): ... @_dispatchable def star_graph(n, create_using: Incomplete | None = None): ... @_dispatchable +def tadpole_graph(m, n, create_using=None) -> Graph[Incomplete] | Incomplete: ... +@_dispatchable def trivial_graph(create_using: Incomplete | None = None): ... @_dispatchable def turan_graph(n, r): ... diff --git a/stubs/networkx/networkx/generators/cographs.pyi b/stubs/networkx/networkx/generators/cographs.pyi index 2349a9dbe..a3081cae6 100644 --- a/stubs/networkx/networkx/generators/cographs.pyi +++ b/stubs/networkx/networkx/generators/cographs.pyi @@ -2,5 +2,7 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["random_cograph"] + @_dispatchable def random_cograph(n, seed: Incomplete | None = None): ... diff --git a/stubs/networkx/networkx/generators/community.pyi b/stubs/networkx/networkx/generators/community.pyi index 8cfedcb8a..d95c6eeee 100644 --- a/stubs/networkx/networkx/generators/community.pyi +++ b/stubs/networkx/networkx/generators/community.pyi @@ -3,6 +3,19 @@ from collections.abc import Collection from networkx.utils.backends import _dispatchable +__all__ = [ + "caveman_graph", + "connected_caveman_graph", + "relaxed_caveman_graph", + "random_partition_graph", + "planted_partition_graph", + "gaussian_random_partition_graph", + "ring_of_cliques", + "windmill_graph", + "stochastic_block_model", + "LFR_benchmark_graph", +] + @_dispatchable def caveman_graph(l, k): ... @_dispatchable diff --git a/stubs/networkx/networkx/generators/directed.pyi b/stubs/networkx/networkx/generators/directed.pyi index 4be5ac627..bb8f174dc 100644 --- a/stubs/networkx/networkx/generators/directed.pyi +++ b/stubs/networkx/networkx/generators/directed.pyi @@ -2,6 +2,8 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["gn_graph", "gnc_graph", "gnr_graph", "random_k_out_graph", "scale_free_graph"] + @_dispatchable def gn_graph(n, kernel: Incomplete | None = None, create_using: Incomplete | None = None, seed: Incomplete | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/generators/duplication.pyi b/stubs/networkx/networkx/generators/duplication.pyi index ec3248a8b..4b62c92c7 100644 --- a/stubs/networkx/networkx/generators/duplication.pyi +++ b/stubs/networkx/networkx/generators/duplication.pyi @@ -2,6 +2,8 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["partial_duplication_graph", "duplication_divergence_graph"] + @_dispatchable def partial_duplication_graph(N, n, p, q, seed: Incomplete | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/generators/ego.pyi b/stubs/networkx/networkx/generators/ego.pyi index f64b9ec10..83725a552 100644 --- a/stubs/networkx/networkx/generators/ego.pyi +++ b/stubs/networkx/networkx/generators/ego.pyi @@ -2,5 +2,7 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["ego_graph"] + @_dispatchable def ego_graph(G, n, radius: float = 1, center: bool = True, undirected: bool = False, distance: Incomplete | None = None): ... diff --git a/stubs/networkx/networkx/generators/expanders.pyi b/stubs/networkx/networkx/generators/expanders.pyi index 9b2d9b1cd..f59596b79 100644 --- a/stubs/networkx/networkx/generators/expanders.pyi +++ b/stubs/networkx/networkx/generators/expanders.pyi @@ -2,9 +2,24 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = [ + "margulis_gabber_galil_graph", + "chordal_cycle_graph", + "paley_graph", + "maybe_regular_expander", + "is_regular_expander", + "random_regular_expander_graph", +] + @_dispatchable def margulis_gabber_galil_graph(n, create_using: Incomplete | None = None): ... @_dispatchable def chordal_cycle_graph(p, create_using: Incomplete | None = None): ... @_dispatchable def paley_graph(p, create_using: Incomplete | None = None): ... +@_dispatchable +def maybe_regular_expander(n, d, *, create_using=None, max_tries=100, seed=None): ... +@_dispatchable +def is_regular_expander(G, *, epsilon=0) -> bool: ... +@_dispatchable +def random_regular_expander_graph(n, d, *, epsilon=0, create_using=None, max_tries=100, seed=None): ... diff --git a/stubs/networkx/networkx/generators/geometric.pyi b/stubs/networkx/networkx/generators/geometric.pyi index 0442140b3..abaaba251 100644 --- a/stubs/networkx/networkx/generators/geometric.pyi +++ b/stubs/networkx/networkx/generators/geometric.pyi @@ -1,7 +1,19 @@ from _typeshed import Incomplete +from networkx.classes.graph import Graph from networkx.utils.backends import _dispatchable +__all__ = [ + "geometric_edges", + "geographical_threshold_graph", + "navigable_small_world_graph", + "random_geometric_graph", + "soft_random_geometric_graph", + "thresholded_random_geometric_graph", + "waxman_graph", + "geometric_soft_configuration_graph", +] + @_dispatchable def geometric_edges(G, radius, p: float = 2): ... @_dispatchable @@ -54,3 +66,7 @@ def thresholded_random_geometric_graph( p: float = 2, seed: Incomplete | None = None, ): ... +@_dispatchable +def geometric_soft_configuration_graph( + *, beta, n=None, gamma=None, mean_degree=None, kappas=None, seed=None +) -> Graph[Incomplete]: ... diff --git a/stubs/networkx/networkx/generators/harary_graph.pyi b/stubs/networkx/networkx/generators/harary_graph.pyi index b62d2e2ce..341308b89 100644 --- a/stubs/networkx/networkx/generators/harary_graph.pyi +++ b/stubs/networkx/networkx/generators/harary_graph.pyi @@ -2,6 +2,8 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["hnm_harary_graph", "hkn_harary_graph"] + @_dispatchable def hnm_harary_graph(n, m, create_using: Incomplete | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/generators/intersection.pyi b/stubs/networkx/networkx/generators/intersection.pyi index a58cbf5be..73a5a7528 100644 --- a/stubs/networkx/networkx/generators/intersection.pyi +++ b/stubs/networkx/networkx/generators/intersection.pyi @@ -2,6 +2,8 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["uniform_random_intersection_graph", "k_random_intersection_graph", "general_random_intersection_graph"] + @_dispatchable def uniform_random_intersection_graph(n, m, p, seed: Incomplete | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/generators/interval_graph.pyi b/stubs/networkx/networkx/generators/interval_graph.pyi index 8a0d89c9e..2901b87d0 100644 --- a/stubs/networkx/networkx/generators/interval_graph.pyi +++ b/stubs/networkx/networkx/generators/interval_graph.pyi @@ -1,4 +1,6 @@ from networkx.utils.backends import _dispatchable +__all__ = ["interval_graph"] + @_dispatchable def interval_graph(intervals): ... diff --git a/stubs/networkx/networkx/generators/joint_degree_seq.pyi b/stubs/networkx/networkx/generators/joint_degree_seq.pyi index 2f4ce6eeb..b9f976ac3 100644 --- a/stubs/networkx/networkx/generators/joint_degree_seq.pyi +++ b/stubs/networkx/networkx/generators/joint_degree_seq.pyi @@ -2,6 +2,8 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["is_valid_joint_degree", "is_valid_directed_joint_degree", "joint_degree_graph", "directed_joint_degree_graph"] + @_dispatchable def is_valid_joint_degree(joint_degrees): ... @_dispatchable diff --git a/stubs/networkx/networkx/generators/lattice.pyi b/stubs/networkx/networkx/generators/lattice.pyi index 50ac54691..29d8e5fa9 100644 --- a/stubs/networkx/networkx/generators/lattice.pyi +++ b/stubs/networkx/networkx/generators/lattice.pyi @@ -2,6 +2,8 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["grid_2d_graph", "grid_graph", "hypercube_graph", "triangular_lattice_graph", "hexagonal_lattice_graph"] + @_dispatchable def grid_2d_graph(m, n, periodic: bool = False, create_using: Incomplete | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/generators/line.pyi b/stubs/networkx/networkx/generators/line.pyi index 9d3625e22..01a36dc83 100644 --- a/stubs/networkx/networkx/generators/line.pyi +++ b/stubs/networkx/networkx/generators/line.pyi @@ -2,6 +2,8 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["line_graph", "inverse_line_graph"] + @_dispatchable def line_graph(G, create_using: Incomplete | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/generators/mycielski.pyi b/stubs/networkx/networkx/generators/mycielski.pyi index 31ced02dc..cc40796b7 100644 --- a/stubs/networkx/networkx/generators/mycielski.pyi +++ b/stubs/networkx/networkx/generators/mycielski.pyi @@ -1,5 +1,7 @@ from networkx.utils.backends import _dispatchable +__all__ = ["mycielskian", "mycielski_graph"] + @_dispatchable def mycielskian(G, iterations: int = 1): ... @_dispatchable diff --git a/stubs/networkx/networkx/generators/nonisomorphic_trees.pyi b/stubs/networkx/networkx/generators/nonisomorphic_trees.pyi index 57e277dde..bf4ee819b 100644 --- a/stubs/networkx/networkx/generators/nonisomorphic_trees.pyi +++ b/stubs/networkx/networkx/generators/nonisomorphic_trees.pyi @@ -3,6 +3,8 @@ from collections.abc import Generator from networkx.utils.backends import _dispatchable +__all__ = ["nonisomorphic_trees", "number_of_nonisomorphic_trees"] + @_dispatchable def nonisomorphic_trees(order, create: str = "graph") -> Generator[Incomplete, None, None]: ... @_dispatchable diff --git a/stubs/networkx/networkx/generators/random_clustered.pyi b/stubs/networkx/networkx/generators/random_clustered.pyi index 1a914e12b..3fa7ff595 100644 --- a/stubs/networkx/networkx/generators/random_clustered.pyi +++ b/stubs/networkx/networkx/generators/random_clustered.pyi @@ -6,6 +6,7 @@ from networkx.classes.graph import Graph from networkx.utils.misc import _RandomState _G = TypeVar("_G", bound=Graph[int]) +__all__ = ["random_clustered_graph"] @overload def random_clustered_graph( diff --git a/stubs/networkx/networkx/generators/random_graphs.pyi b/stubs/networkx/networkx/generators/random_graphs.pyi index e3b557c78..a0e78626e 100644 --- a/stubs/networkx/networkx/generators/random_graphs.pyi +++ b/stubs/networkx/networkx/generators/random_graphs.pyi @@ -2,6 +2,28 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = [ + "fast_gnp_random_graph", + "gnp_random_graph", + "dense_gnm_random_graph", + "gnm_random_graph", + "erdos_renyi_graph", + "binomial_graph", + "newman_watts_strogatz_graph", + "watts_strogatz_graph", + "connected_watts_strogatz_graph", + "random_regular_graph", + "barabasi_albert_graph", + "dual_barabasi_albert_graph", + "extended_barabasi_albert_graph", + "powerlaw_cluster_graph", + "random_lobster", + "random_shell_graph", + "random_powerlaw_tree", + "random_powerlaw_tree_sequence", + "random_kernel_graph", +] + @_dispatchable def fast_gnp_random_graph(n, p, seed: Incomplete | None = None, directed: bool = False): ... @_dispatchable diff --git a/stubs/networkx/networkx/generators/small.pyi b/stubs/networkx/networkx/generators/small.pyi index 4563f2308..97c1057d8 100644 --- a/stubs/networkx/networkx/generators/small.pyi +++ b/stubs/networkx/networkx/generators/small.pyi @@ -2,6 +2,32 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = [ + "LCF_graph", + "bull_graph", + "chvatal_graph", + "cubical_graph", + "desargues_graph", + "diamond_graph", + "dodecahedral_graph", + "frucht_graph", + "heawood_graph", + "hoffman_singleton_graph", + "house_graph", + "house_x_graph", + "icosahedral_graph", + "krackhardt_kite_graph", + "moebius_kantor_graph", + "octahedral_graph", + "pappus_graph", + "petersen_graph", + "sedgewick_maze_graph", + "tetrahedral_graph", + "truncated_cube_graph", + "truncated_tetrahedron_graph", + "tutte_graph", +] + @_dispatchable def LCF_graph(n, shift_list, repeats, create_using: Incomplete | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/generators/social.pyi b/stubs/networkx/networkx/generators/social.pyi index b14571066..7a67b31c5 100644 --- a/stubs/networkx/networkx/generators/social.pyi +++ b/stubs/networkx/networkx/generators/social.pyi @@ -1,5 +1,7 @@ from networkx.utils.backends import _dispatchable +__all__ = ["karate_club_graph", "davis_southern_women_graph", "florentine_families_graph", "les_miserables_graph"] + @_dispatchable def karate_club_graph(): ... @_dispatchable diff --git a/stubs/networkx/networkx/generators/spectral_graph_forge.pyi b/stubs/networkx/networkx/generators/spectral_graph_forge.pyi index 23e1e5bff..6fc6902a3 100644 --- a/stubs/networkx/networkx/generators/spectral_graph_forge.pyi +++ b/stubs/networkx/networkx/generators/spectral_graph_forge.pyi @@ -2,5 +2,7 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["spectral_graph_forge"] + @_dispatchable def spectral_graph_forge(G, alpha, transformation: str = "identity", seed: Incomplete | None = None): ... diff --git a/stubs/networkx/networkx/generators/stochastic.pyi b/stubs/networkx/networkx/generators/stochastic.pyi index 4dd8f1ecb..045818852 100644 --- a/stubs/networkx/networkx/generators/stochastic.pyi +++ b/stubs/networkx/networkx/generators/stochastic.pyi @@ -1,4 +1,6 @@ from networkx.utils.backends import _dispatchable +__all__ = ["stochastic_graph"] + @_dispatchable def stochastic_graph(G, copy: bool = True, weight: str = "weight"): ... diff --git a/stubs/networkx/networkx/generators/sudoku.pyi b/stubs/networkx/networkx/generators/sudoku.pyi index 15eb488e7..453852197 100644 --- a/stubs/networkx/networkx/generators/sudoku.pyi +++ b/stubs/networkx/networkx/generators/sudoku.pyi @@ -1,4 +1,6 @@ from networkx.utils.backends import _dispatchable +__all__ = ["sudoku_graph"] + @_dispatchable def sudoku_graph(n: int = 3): ... diff --git a/stubs/networkx/networkx/generators/time_series.pyi b/stubs/networkx/networkx/generators/time_series.pyi index b5655e820..b240695b1 100644 --- a/stubs/networkx/networkx/generators/time_series.pyi +++ b/stubs/networkx/networkx/generators/time_series.pyi @@ -1,4 +1,6 @@ from networkx.utils.backends import _dispatchable +__all__ = ["visibility_graph"] + @_dispatchable def visibility_graph(series): ... diff --git a/stubs/networkx/networkx/generators/trees.pyi b/stubs/networkx/networkx/generators/trees.pyi index 238bc03ef..8652af12a 100644 --- a/stubs/networkx/networkx/generators/trees.pyi +++ b/stubs/networkx/networkx/generators/trees.pyi @@ -1,6 +1,31 @@ +from _typeshed import Incomplete + from networkx.utils.backends import _dispatchable +__all__ = [ + "prefix_tree", + "prefix_tree_recursive", + "random_labeled_tree", + "random_labeled_rooted_tree", + "random_labeled_rooted_forest", + "random_unlabeled_tree", + "random_unlabeled_rooted_tree", + "random_unlabeled_rooted_forest", +] + @_dispatchable def prefix_tree(paths): ... @_dispatchable def prefix_tree_recursive(paths): ... +@_dispatchable +def random_labeled_tree(n, *, seed=None): ... +@_dispatchable +def random_labeled_rooted_tree(n, *, seed=None): ... +@_dispatchable +def random_unlabeled_rooted_tree(n, *, number_of_trees=None, seed=None) -> Incomplete | list[Incomplete]: ... +@_dispatchable +def random_labeled_rooted_forest(n, *, seed=None): ... +@_dispatchable +def random_unlabeled_rooted_forest(n, *, q=None, number_of_forests=None, seed=None) -> Incomplete | list[Incomplete]: ... +@_dispatchable +def random_unlabeled_tree(n, *, number_of_trees=None, seed=None) -> Incomplete | list[Incomplete]: ... diff --git a/stubs/networkx/networkx/generators/triads.pyi b/stubs/networkx/networkx/generators/triads.pyi index cdc648ee3..e0ce3d432 100644 --- a/stubs/networkx/networkx/generators/triads.pyi +++ b/stubs/networkx/networkx/generators/triads.pyi @@ -1,4 +1,6 @@ from networkx.utils.backends import _dispatchable +__all__ = ["triad_graph"] + @_dispatchable def triad_graph(triad_name): ... diff --git a/stubs/networkx/networkx/linalg/algebraicconnectivity.pyi b/stubs/networkx/networkx/linalg/algebraicconnectivity.pyi index 529612251..fa12fa8c1 100644 --- a/stubs/networkx/networkx/linalg/algebraicconnectivity.pyi +++ b/stubs/networkx/networkx/linalg/algebraicconnectivity.pyi @@ -2,6 +2,8 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["algebraic_connectivity", "fiedler_vector", "spectral_ordering", "spectral_bisection"] + class _PCGSolver: def __init__(self, A, M) -> None: ... def solve(self, B, tol): ... diff --git a/stubs/networkx/networkx/linalg/attrmatrix.pyi b/stubs/networkx/networkx/linalg/attrmatrix.pyi index 360a53ffb..3e645842e 100644 --- a/stubs/networkx/networkx/linalg/attrmatrix.pyi +++ b/stubs/networkx/networkx/linalg/attrmatrix.pyi @@ -2,6 +2,8 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["attr_matrix", "attr_sparse_matrix"] + @_dispatchable def attr_matrix( G, diff --git a/stubs/networkx/networkx/linalg/bethehessianmatrix.pyi b/stubs/networkx/networkx/linalg/bethehessianmatrix.pyi index 70bafa4f9..2e98b1cdb 100644 --- a/stubs/networkx/networkx/linalg/bethehessianmatrix.pyi +++ b/stubs/networkx/networkx/linalg/bethehessianmatrix.pyi @@ -3,5 +3,7 @@ from collections.abc import Collection from networkx.utils.backends import _dispatchable +__all__ = ["bethe_hessian_matrix"] + @_dispatchable def bethe_hessian_matrix(G, r: Incomplete | None = None, nodelist: Collection[Incomplete] | None = None): ... diff --git a/stubs/networkx/networkx/linalg/graphmatrix.pyi b/stubs/networkx/networkx/linalg/graphmatrix.pyi index a26cdff36..97fb7371c 100644 --- a/stubs/networkx/networkx/linalg/graphmatrix.pyi +++ b/stubs/networkx/networkx/linalg/graphmatrix.pyi @@ -3,6 +3,8 @@ from collections.abc import Collection from networkx.utils.backends import _dispatchable +__all__ = ["incidence_matrix", "adjacency_matrix"] + @_dispatchable def incidence_matrix( G, diff --git a/stubs/networkx/networkx/linalg/laplacianmatrix.pyi b/stubs/networkx/networkx/linalg/laplacianmatrix.pyi index db9a7745c..ebbfd8479 100644 --- a/stubs/networkx/networkx/linalg/laplacianmatrix.pyi +++ b/stubs/networkx/networkx/linalg/laplacianmatrix.pyi @@ -3,6 +3,14 @@ from collections.abc import Collection from networkx.utils.backends import _dispatchable +__all__ = [ + "laplacian_matrix", + "normalized_laplacian_matrix", + "total_spanning_tree_weight", + "directed_laplacian_matrix", + "directed_combinatorial_laplacian_matrix", +] + @_dispatchable def laplacian_matrix(G, nodelist: Collection[Incomplete] | None = None, weight: str = "weight"): ... @_dispatchable diff --git a/stubs/networkx/networkx/linalg/modularitymatrix.pyi b/stubs/networkx/networkx/linalg/modularitymatrix.pyi index 7cc73a5f0..03b0e1ef1 100644 --- a/stubs/networkx/networkx/linalg/modularitymatrix.pyi +++ b/stubs/networkx/networkx/linalg/modularitymatrix.pyi @@ -3,6 +3,8 @@ from collections.abc import Collection from networkx.utils.backends import _dispatchable +__all__ = ["modularity_matrix", "directed_modularity_matrix"] + @_dispatchable def modularity_matrix(G, nodelist: Collection[Incomplete] | None = None, weight: Incomplete | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/linalg/spectrum.pyi b/stubs/networkx/networkx/linalg/spectrum.pyi index dae0e6300..3051a272c 100644 --- a/stubs/networkx/networkx/linalg/spectrum.pyi +++ b/stubs/networkx/networkx/linalg/spectrum.pyi @@ -2,6 +2,14 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = [ + "laplacian_spectrum", + "adjacency_spectrum", + "modularity_spectrum", + "normalized_laplacian_spectrum", + "bethe_hessian_spectrum", +] + @_dispatchable def laplacian_spectrum(G, weight: str = "weight"): ... @_dispatchable diff --git a/stubs/networkx/networkx/readwrite/adjlist.pyi b/stubs/networkx/networkx/readwrite/adjlist.pyi index ad2f31f2e..b9cbfef32 100644 --- a/stubs/networkx/networkx/readwrite/adjlist.pyi +++ b/stubs/networkx/networkx/readwrite/adjlist.pyi @@ -3,6 +3,8 @@ from collections.abc import Generator from networkx.utils.backends import _dispatchable +__all__ = ["generate_adjlist", "write_adjlist", "parse_adjlist", "read_adjlist"] + def generate_adjlist(G, delimiter: str = " ") -> Generator[Incomplete, None, None]: ... def write_adjlist(G, path, comments: str = "#", delimiter: str = " ", encoding: str = "utf-8") -> None: ... @_dispatchable diff --git a/stubs/networkx/networkx/readwrite/edgelist.pyi b/stubs/networkx/networkx/readwrite/edgelist.pyi index c8587b307..ddb2b6d88 100644 --- a/stubs/networkx/networkx/readwrite/edgelist.pyi +++ b/stubs/networkx/networkx/readwrite/edgelist.pyi @@ -3,6 +3,15 @@ from collections.abc import Generator from networkx.utils.backends import _dispatchable +__all__ = [ + "generate_edgelist", + "write_edgelist", + "parse_edgelist", + "read_edgelist", + "read_weighted_edgelist", + "write_weighted_edgelist", +] + def generate_edgelist(G, delimiter: str = " ", data: bool = True) -> Generator[Incomplete, None, None]: ... def write_edgelist(G, path, comments: str = "#", delimiter: str = " ", data: bool = True, encoding: str = "utf-8") -> None: ... @_dispatchable diff --git a/stubs/networkx/networkx/readwrite/graph6.pyi b/stubs/networkx/networkx/readwrite/graph6.pyi index e1379b456..092bffdf2 100644 --- a/stubs/networkx/networkx/readwrite/graph6.pyi +++ b/stubs/networkx/networkx/readwrite/graph6.pyi @@ -2,6 +2,8 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["from_graph6_bytes", "read_graph6", "to_graph6_bytes", "write_graph6"] + @_dispatchable def from_graph6_bytes(bytes_in): ... def to_graph6_bytes(G, nodes: Incomplete | None = None, header: bool = True): ... diff --git a/stubs/networkx/networkx/readwrite/json_graph/adjacency.pyi b/stubs/networkx/networkx/readwrite/json_graph/adjacency.pyi index 35953a37d..f1745015f 100644 --- a/stubs/networkx/networkx/readwrite/json_graph/adjacency.pyi +++ b/stubs/networkx/networkx/readwrite/json_graph/adjacency.pyi @@ -1,5 +1,7 @@ from networkx.utils.backends import _dispatchable +__all__ = ["adjacency_data", "adjacency_graph"] + @_dispatchable def adjacency_data(G, attrs={"id": "id", "key": "key"}): ... @_dispatchable diff --git a/stubs/networkx/networkx/readwrite/json_graph/cytoscape.pyi b/stubs/networkx/networkx/readwrite/json_graph/cytoscape.pyi index 59ce696c8..6b5155209 100644 --- a/stubs/networkx/networkx/readwrite/json_graph/cytoscape.pyi +++ b/stubs/networkx/networkx/readwrite/json_graph/cytoscape.pyi @@ -1,5 +1,7 @@ from networkx.utils.backends import _dispatchable +__all__ = ["cytoscape_data", "cytoscape_graph"] + def cytoscape_data(G, name: str = "name", ident: str = "id"): ... @_dispatchable def cytoscape_graph(data, name: str = "name", ident: str = "id"): ... diff --git a/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi b/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi index cb4c7e676..2f15c525d 100644 --- a/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi +++ b/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi @@ -2,6 +2,8 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["node_link_data", "node_link_graph"] + def node_link_data( G, *, diff --git a/stubs/networkx/networkx/readwrite/json_graph/tree.pyi b/stubs/networkx/networkx/readwrite/json_graph/tree.pyi index c9e503fa7..1b2154653 100644 --- a/stubs/networkx/networkx/readwrite/json_graph/tree.pyi +++ b/stubs/networkx/networkx/readwrite/json_graph/tree.pyi @@ -1,5 +1,7 @@ from networkx.utils.backends import _dispatchable +__all__ = ["tree_data", "tree_graph"] + def tree_data(G, root, ident: str = "id", children: str = "children"): ... @_dispatchable def tree_graph(data, ident: str = "id", children: str = "children"): ... diff --git a/stubs/networkx/networkx/readwrite/leda.pyi b/stubs/networkx/networkx/readwrite/leda.pyi index 604a687ef..733005d1c 100644 --- a/stubs/networkx/networkx/readwrite/leda.pyi +++ b/stubs/networkx/networkx/readwrite/leda.pyi @@ -1,5 +1,7 @@ from networkx.utils.backends import _dispatchable +__all__ = ["read_leda", "parse_leda"] + @_dispatchable def read_leda(path, encoding: str = "UTF-8"): ... @_dispatchable diff --git a/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi b/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi index 7764cac9e..a83096ae3 100644 --- a/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi +++ b/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi @@ -3,6 +3,8 @@ from collections.abc import Generator from networkx.utils.backends import _dispatchable +__all__ = ["generate_multiline_adjlist", "write_multiline_adjlist", "parse_multiline_adjlist", "read_multiline_adjlist"] + def generate_multiline_adjlist(G, delimiter: str = " ") -> Generator[Incomplete, None, None]: ... def write_multiline_adjlist(G, path, delimiter: str = " ", comments: str = "#", encoding: str = "utf-8") -> None: ... @_dispatchable diff --git a/stubs/networkx/networkx/readwrite/pajek.pyi b/stubs/networkx/networkx/readwrite/pajek.pyi index f48590aa9..b34dfb83a 100644 --- a/stubs/networkx/networkx/readwrite/pajek.pyi +++ b/stubs/networkx/networkx/readwrite/pajek.pyi @@ -3,6 +3,8 @@ from collections.abc import Generator from networkx.utils.backends import _dispatchable +__all__ = ["read_pajek", "parse_pajek", "generate_pajek", "write_pajek"] + def generate_pajek(G) -> Generator[Incomplete, None, None]: ... def write_pajek(G, path, encoding: str = "UTF-8") -> None: ... @_dispatchable diff --git a/stubs/networkx/networkx/readwrite/sparse6.pyi b/stubs/networkx/networkx/readwrite/sparse6.pyi index a1f2e30e6..10a140c0a 100644 --- a/stubs/networkx/networkx/readwrite/sparse6.pyi +++ b/stubs/networkx/networkx/readwrite/sparse6.pyi @@ -2,6 +2,8 @@ from _typeshed import Incomplete from networkx.utils.backends import _dispatchable +__all__ = ["from_sparse6_bytes", "read_sparse6", "to_sparse6_bytes", "write_sparse6"] + @_dispatchable def from_sparse6_bytes(string): ... def to_sparse6_bytes(G, nodes: Incomplete | None = None, header: bool = True): ... diff --git a/stubs/networkx/networkx/relabel.pyi b/stubs/networkx/networkx/relabel.pyi index 57aa63843..4951676ca 100644 --- a/stubs/networkx/networkx/relabel.pyi +++ b/stubs/networkx/networkx/relabel.pyi @@ -11,6 +11,8 @@ from networkx.utils.backends import _dispatchable _X = TypeVar("_X", bound=Hashable) _Y = TypeVar("_Y", bound=Hashable) +__all__ = ["convert_node_labels_to_integers", "relabel_nodes"] + @overload def relabel_nodes(G: MultiDiGraph[_X], mapping: Mapping[_X, _Y], copy: bool = True) -> MultiDiGraph[_X | _Y]: ... @overload diff --git a/stubs/networkx/networkx/utils/__init__.pyi b/stubs/networkx/networkx/utils/__init__.pyi index 7e234b3f7..5d8fb921b 100644 --- a/stubs/networkx/networkx/utils/__init__.pyi +++ b/stubs/networkx/networkx/utils/__init__.pyi @@ -1,5 +1,6 @@ from networkx.utils.backends import _dispatchable as _dispatchable from networkx.utils.configs import * +from networkx.utils.configs import NetworkXConfig from networkx.utils.decorators import * from networkx.utils.heaps import * @@ -23,3 +24,5 @@ from networkx.utils.misc import ( from networkx.utils.random_sequence import * from networkx.utils.rcm import * from networkx.utils.union_find import * + +config: NetworkXConfig # Set by networkx/__init__.py diff --git a/stubs/networkx/networkx/utils/configs.pyi b/stubs/networkx/networkx/utils/configs.pyi index 1e6548df5..42f48e2dc 100644 --- a/stubs/networkx/networkx/utils/configs.pyi +++ b/stubs/networkx/networkx/utils/configs.pyi @@ -2,7 +2,7 @@ from _typeshed import Incomplete from collections.abc import ItemsView, Iterable, Iterator, KeysView, Mapping, ValuesView from typing_extensions import Self -__all__ = ["Config", "config"] +__all__ = ["Config"] class Config(Mapping[str, Incomplete]): def __init_subclass__(cls, strict: bool = True) -> None: ... diff --git a/stubs/networkx/networkx/utils/decorators.pyi b/stubs/networkx/networkx/utils/decorators.pyi index 82cd9492d..af8b401c8 100644 --- a/stubs/networkx/networkx/utils/decorators.pyi +++ b/stubs/networkx/networkx/utils/decorators.pyi @@ -1,6 +1,8 @@ from _typeshed import Incomplete from typing import NamedTuple +__all__ = ["not_implemented_for", "open_file", "nodes_or_number", "np_random_state", "py_random_state", "argmap"] + def not_implemented_for(*graph_types): ... def open_file(path_arg, mode: str = "r"): ... def nodes_or_number(which_args): ... diff --git a/stubs/networkx/networkx/utils/heaps.pyi b/stubs/networkx/networkx/utils/heaps.pyi index e7d610aa9..43cd69b1b 100644 --- a/stubs/networkx/networkx/utils/heaps.pyi +++ b/stubs/networkx/networkx/utils/heaps.pyi @@ -1,5 +1,7 @@ from _typeshed import Incomplete +__all__ = ["MinHeap", "PairingHeap", "BinaryHeap"] + class MinHeap: class _Item: key: Incomplete diff --git a/stubs/networkx/networkx/utils/mapped_queue.pyi b/stubs/networkx/networkx/utils/mapped_queue.pyi index 9d9fadb46..e5eb305ab 100644 --- a/stubs/networkx/networkx/utils/mapped_queue.pyi +++ b/stubs/networkx/networkx/utils/mapped_queue.pyi @@ -1,6 +1,8 @@ from _typeshed import Incomplete from collections.abc import Iterator +__all__ = ["MappedQueue"] + class _HeapElement: priority: Incomplete element: Incomplete diff --git a/stubs/networkx/networkx/utils/random_sequence.pyi b/stubs/networkx/networkx/utils/random_sequence.pyi index 921b79a04..3d89df428 100644 --- a/stubs/networkx/networkx/utils/random_sequence.pyi +++ b/stubs/networkx/networkx/utils/random_sequence.pyi @@ -1,5 +1,14 @@ from _typeshed import Incomplete +__all__ = [ + "powerlaw_sequence", + "zipf_rv", + "cumulative_distribution", + "discrete_sequence", + "random_weighted_sample", + "weighted_choice", +] + def powerlaw_sequence(n, exponent: float = 2.0, seed: Incomplete | None = None): ... def zipf_rv(alpha, xmin: int = 1, seed: Incomplete | None = None): ... def cumulative_distribution(distribution): ... diff --git a/stubs/networkx/networkx/utils/rcm.pyi b/stubs/networkx/networkx/utils/rcm.pyi index 35ff04993..cfe7c2deb 100644 --- a/stubs/networkx/networkx/utils/rcm.pyi +++ b/stubs/networkx/networkx/utils/rcm.pyi @@ -1,5 +1,7 @@ from _typeshed import Incomplete from collections.abc import Generator +__all__ = ["cuthill_mckee_ordering", "reverse_cuthill_mckee_ordering"] + def cuthill_mckee_ordering(G, heuristic: Incomplete | None = None) -> Generator[Incomplete, Incomplete, None]: ... def reverse_cuthill_mckee_ordering(G, heuristic: Incomplete | None = None): ...