mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-08 22:36:18 +08:00
[networkx] Update to 3.6.1 (#15123)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
version = "3.6"
|
||||
version = "3.6.1"
|
||||
upstream_repository = "https://github.com/networkx/networkx"
|
||||
# requires a version of numpy with a `py.typed` file
|
||||
requires = ["numpy>=1.20"]
|
||||
|
||||
@@ -16,4 +16,11 @@ def biadjacency_matrix(
|
||||
format="csr",
|
||||
): ... # Return is a complex union of scipy classes depending on the format param
|
||||
@_dispatchable
|
||||
def from_biadjacency_matrix(A, create_using: Graph[_Node] | None = None, edge_attribute: str = "weight"): ...
|
||||
def from_biadjacency_matrix(
|
||||
A,
|
||||
create_using: Graph[_Node] | None = None,
|
||||
edge_attribute: str = "weight",
|
||||
*,
|
||||
row_order: Iterable[Incomplete] | None = None,
|
||||
column_order: Iterable[Incomplete] | None = None,
|
||||
): ...
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from networkx.algorithms.community.asyn_fluid import *
|
||||
from networkx.algorithms.community.bipartitions import *
|
||||
from networkx.algorithms.community.centrality import *
|
||||
from networkx.algorithms.community.community_utils import *
|
||||
from networkx.algorithms.community.divisive import *
|
||||
from networkx.algorithms.community.kclique import *
|
||||
from networkx.algorithms.community.kernighan_lin import *
|
||||
from networkx.algorithms.community.label_propagation import *
|
||||
from networkx.algorithms.community.leiden import *
|
||||
from networkx.algorithms.community.local import *
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.algorithms.shortest_paths.weighted import _WeightFunc
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
from numpy.random import RandomState
|
||||
|
||||
__all__ = ["kernighan_lin_bisection", "spectral_modularity_bipartition", "greedy_node_swap_bipartition"]
|
||||
|
||||
@_dispatchable
|
||||
def kernighan_lin_bisection(
|
||||
G: Graph[_Node],
|
||||
partition: tuple[Iterable[Incomplete], Iterable[Incomplete]] | None = None,
|
||||
max_iter: int = 10,
|
||||
weight: str | _WeightFunc[_Node] = "weight",
|
||||
seed: int | RandomState | None = None,
|
||||
) -> tuple[set[Incomplete], set[Incomplete]]: ...
|
||||
def spectral_modularity_bipartition(G: Graph[_Node]) -> tuple[set[Incomplete], set[Incomplete]]: ...
|
||||
def greedy_node_swap_bipartition(
|
||||
G: Graph[_Node], *, init_split: tuple[set[Incomplete], set[Incomplete]] | None = None, max_iter: int = 10
|
||||
) -> tuple[set[Incomplete], set[Incomplete]]: ...
|
||||
@@ -1,16 +0,0 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
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],
|
||||
partition: tuple[Incomplete] | None = None,
|
||||
max_iter: int = 10,
|
||||
weight: str = "weight",
|
||||
seed: int | RandomState | None = None,
|
||||
): ...
|
||||
@@ -43,7 +43,7 @@ class Graph(Collection[_Node]):
|
||||
def to_undirected_class(self) -> type[Graph[_Node]]: ...
|
||||
# @_dispatchable adds `backend` argument, but this decorated is unsupported constructor type here
|
||||
# and __init__() ignores this argument
|
||||
def __new__(cls, incoming_graph_data: _Data[_Node] | None = None, *, backend=None, **attr: Any) -> Self: ...
|
||||
def __new__(cls, *args, backend=None, **kwargs) -> Self: ...
|
||||
def __init__(self, incoming_graph_data: _Data[_Node] | None = None, **attr: Any) -> None: ... # attr: key=value pairs
|
||||
@cached_property
|
||||
def adj(self) -> AdjacencyView[_Node, _Node, dict[str, Any]]: ...
|
||||
|
||||
@@ -24,7 +24,7 @@ class MultiGraph(Graph[_Node]):
|
||||
def to_undirected_class(self) -> type[MultiGraph[_Node]]: ...
|
||||
# @_dispatchable adds `backend` argument, but this decorated is unsupported constructor type here
|
||||
# and __init__() ignores this argument
|
||||
def __new__(cls, incoming_graph_data=None, multigraph_input: bool | None = None, *, backend=None, **attr: Any) -> Self: ...
|
||||
def __new__(cls, *args, backend=None, **kwargs) -> Self: ...
|
||||
def __init__(self, incoming_graph_data=None, multigraph_input: bool | None = None, **attr: Any) -> None: ...
|
||||
@cached_property
|
||||
def adj(self) -> MultiAdjacencyView[_Node, _Node, dict[str, Any]]: ... # data can be any type
|
||||
|
||||
Reference in New Issue
Block a user