basedpyright 1.31.7 → 1.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pyright-langserver.js +1 -1
- package/dist/pyright-langserver.js.map +1 -1
- package/dist/pyright.js +1 -1
- package/dist/pyright.js.map +1 -1
- package/dist/typeshed-fallback/commit.txt +1 -1
- package/dist/typeshed-fallback/stdlib/_csv.pyi +4 -3
- package/dist/typeshed-fallback/stdlib/_frozen_importlib.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_frozen_importlib_external.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi +3 -0
- package/dist/typeshed-fallback/stdlib/ast.pyi +29 -10
- package/dist/typeshed-fallback/stdlib/builtins.pyi +79 -62
- package/dist/typeshed-fallback/stdlib/cmath.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/copy.pyi +6 -6
- package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/email/headerregistry.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/html/parser.pyi +4 -9
- package/dist/typeshed-fallback/stdlib/importlib/abc.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/importlib/resources/__init__.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/importlib/resources/_functional.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/operator.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/pdb.pyi +5 -0
- package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +160 -69
- package/dist/typeshed-fallback/stdlib/turtle.pyi +18 -14
- package/dist/typeshed-fallback/stdlib/types.pyi +21 -16
- package/dist/typeshed-fallback/stdlib/typing.pyi +12 -2
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/xml/etree/ElementTree.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/xxlimited.pyi +16 -3
- package/dist/typeshed-fallback/stubs/Authlib/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7515/jws.pyi +3 -2
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7516/models.pyi +2 -2
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/jwe_zips.pyi +7 -2
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7591/endpoint.pyi +6 -4
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/constants.pyi +22 -0
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio.pyi +2 -21
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio_cdev.pyi +11 -0
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio_pin_data.pyi +22 -3
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio_pinmux_lookup.pyi +6 -0
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/PySocks/sockshandler.pyi +0 -5
- package/dist/typeshed-fallback/stubs/aiofiles/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/base.pyi +2 -0
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/os.pyi +1 -1
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/ospath.pyi +15 -4
- package/dist/typeshed-fallback/stubs/braintree/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/braintree/braintree/__init__.pyi +11 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/bank_account_instant_verification_gateway.pyi +13 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/bank_account_instant_verification_jwt.pyi +8 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/bank_account_instant_verification_jwt_request.pyi +18 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/braintree_gateway.pyi +4 -3
- package/dist/typeshed-fallback/stubs/braintree/braintree/error_codes.pyi +2 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/receiver.pyi +6 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/sender.pyi +6 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/transaction_us_bank_account_request.pyi +17 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/transfer.pyi +4 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/us_bank_account_verification.pyi +1 -0
- package/dist/typeshed-fallback/stubs/cachetools/cachetools/__init__.pyi +36 -5
- package/dist/typeshed-fallback/stubs/cachetools/cachetools/func.pyi +45 -10
- package/dist/typeshed-fallback/stubs/cachetools/cachetools/keys.pyi +2 -2
- package/dist/typeshed-fallback/stubs/django-filter/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/django-filter/django_filters/filters.pyi +1 -1
- package/dist/typeshed-fallback/stubs/docker/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/docker/docker/api/image.pyi +2 -2
- package/dist/typeshed-fallback/stubs/docker/docker/api/swarm.pyi +12 -9
- package/dist/typeshed-fallback/stubs/docker/docker/credentials/store.pyi +3 -3
- package/dist/typeshed-fallback/stubs/docker/docker/errors.pyi +9 -7
- package/dist/typeshed-fallback/stubs/docker/docker/models/services.pyi +4 -6
- package/dist/typeshed-fallback/stubs/docker/docker/transport/npipeconn.pyi +16 -16
- package/dist/typeshed-fallback/stubs/docker/docker/transport/npipesocket.pyi +40 -32
- package/dist/typeshed-fallback/stubs/docker/docker/transport/sshconn.pyi +30 -24
- package/dist/typeshed-fallback/stubs/docker/docker/transport/unixconn.pyi +22 -19
- package/dist/typeshed-fallback/stubs/docker/docker/types/networks.pyi +1 -1
- package/dist/typeshed-fallback/stubs/docker/docker/types/services.pyi +16 -10
- package/dist/typeshed-fallback/stubs/docker/docker/types/swarm.pyi +2 -7
- package/dist/typeshed-fallback/stubs/docker/docker/utils/decorators.pyi +8 -4
- package/dist/typeshed-fallback/stubs/docker/docker/utils/utils.pyi +4 -4
- package/dist/typeshed-fallback/stubs/docutils/docutils/nodes.pyi +2 -2
- package/dist/typeshed-fallback/stubs/flake8-rst-docstrings/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/flake8-typing-imports/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/grpcio/grpc/__init__.pyi +32 -34
- package/dist/typeshed-fallback/stubs/grpcio/grpc/aio/__init__.pyi +40 -21
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/app/base.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/app/wsgiapp.pyi +0 -4
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/config.pyi +1 -2
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/glogging.pyi +1 -2
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/http/message.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/http/unreader.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/http/wsgi.pyi +0 -2
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/instrument/statsd.pyi +0 -9
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/reloader.pyi +1 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/sock.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/geventlet.pyi +1 -8
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/ggevent.pyi +0 -9
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/gtornado.pyi +1 -4
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/sync.pyi +0 -3
- package/dist/typeshed-fallback/stubs/html5lib/html5lib/html5parser.pyi +5 -5
- package/dist/typeshed-fallback/stubs/jsonschema/jsonschema/exceptions.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/edgelist.pyi +4 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/flow_matrix.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/chordal.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/clique.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/greedy_coloring.pyi +11 -9
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/label_propagation.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/quality.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/utils.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/d_separation.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/efficiency_measures.pyi +4 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/utils.pyi +10 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/hierarchy.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/binary.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/product.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/planarity.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/branchings.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/decomposition.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/mst.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/wiener.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/classes/function.pyi +26 -19
- package/dist/typeshed-fallback/stubs/networkx/networkx/convert_matrix.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/ego.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/geometric.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/line.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/mycielski.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/spectral_graph_forge.pyi +2 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/stochastic.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/adjlist.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/edgelist.pyi +8 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/gexf.pyi +9 -8
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/gml.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/graph6.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/graphml.pyi +10 -9
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/adjacency.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/cytoscape.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi +22 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/tree.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/p2g.pyi +3 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/pajek.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/sparse6.pyi +3 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/utils/backends.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/utils/misc.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/utils/rcm.pyi +2 -2
- package/dist/typeshed-fallback/stubs/psutil/psutil/__init__.pyi +11 -4
- package/dist/typeshed-fallback/stubs/psycopg2/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/psycopg2/psycopg2/errorcodes.pyi +3 -0
- package/dist/typeshed-fallback/stubs/pyserial/serial/rfc2217.pyi +2 -2
- package/dist/typeshed-fallback/stubs/pyserial/serial/serialutil.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pyserial/serial/tools/list_ports.pyi +3 -1
- package/dist/typeshed-fallback/stubs/pyserial/serial/tools/list_ports_windows.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pyserial/serial/urlhandler/protocol_spy.pyi +2 -2
- package/dist/typeshed-fallback/stubs/python-dateutil/dateutil/rrule.pyi +30 -1
- package/dist/typeshed-fallback/stubs/pywin32/win32/win32pipe.pyi +1 -1
- package/dist/typeshed-fallback/stubs/six/six/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stubs/www-authenticate/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/www-authenticate/www_authenticate.pyi +34 -0
- package/dist/typeshed-fallback/stubs/xlrd/xlrd/sheet.pyi +5 -5
- package/dist/typeshed-fallback/stubs/xmldiff/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/actions.pyi +58 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/diff.pyi +36 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/diff_match_patch.pyi +58 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/formatting.pyi +80 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/main.pyi +70 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/patch.pyi +12 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/utils.pyi +16 -0
- package/dist/typeshed-fallback/stubs/yt-dlp/yt_dlp/extractor/common.pyi +48 -32
- package/dist/typeshed-fallback/stubs/yt-dlp/yt_dlp/extractor/commonmistakes.pyi +5 -3
- package/dist/typeshed-fallback/stubs/yt-dlp/yt_dlp/extractor/commonprotocols.pyi +5 -3
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
from networkx.classes.graph import _Node
|
|
1
|
+
from networkx.classes.graph import Graph, _Node
|
|
2
2
|
from networkx.utils.backends import _dispatchable
|
|
3
3
|
|
|
4
4
|
__all__ = ["efficiency", "local_efficiency", "global_efficiency"]
|
|
5
5
|
|
|
6
6
|
@_dispatchable
|
|
7
|
-
def efficiency(G, u: _Node, v: _Node) -> float: ...
|
|
7
|
+
def efficiency(G: Graph[_Node], u: _Node, v: _Node) -> float: ...
|
|
8
8
|
@_dispatchable
|
|
9
|
-
def global_efficiency(G) -> float: ...
|
|
9
|
+
def global_efficiency(G: Graph[_Node]) -> float: ...
|
|
10
10
|
@_dispatchable
|
|
11
|
-
def local_efficiency(G) -> float: ...
|
|
11
|
+
def local_efficiency(G: Graph[_Node]) -> float: ...
|
|
@@ -26,7 +26,9 @@ class _DataEssentialsAndFunctions:
|
|
|
26
26
|
prev_node_dft: Incomplete
|
|
27
27
|
last_descendent_dft: Incomplete
|
|
28
28
|
|
|
29
|
-
def __init__(
|
|
29
|
+
def __init__(
|
|
30
|
+
self, G: Graph[_Node], multigraph, demand: str = "demand", capacity: str = "capacity", weight: str = "weight"
|
|
31
|
+
) -> None: ...
|
|
30
32
|
def initialize_spanning_tree(self, n, faux_inf) -> None: ...
|
|
31
33
|
def find_apex(self, p, q): ...
|
|
32
34
|
def trace_path(self, p, w): ...
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
from _typeshed import Incomplete
|
|
2
|
+
from typing import NoReturn, overload
|
|
3
|
+
from typing_extensions import deprecated
|
|
2
4
|
|
|
5
|
+
from networkx.classes.graph import Graph, _Node
|
|
6
|
+
from networkx.classes.multigraph import MultiGraph
|
|
3
7
|
from networkx.utils.backends import _dispatchable
|
|
4
8
|
|
|
5
9
|
__all__ = ["CurrentEdge", "Level", "GlobalRelabelThreshold", "build_residual_network", "detect_unboundedness", "build_flow_dict"]
|
|
@@ -23,9 +27,12 @@ class GlobalRelabelThreshold:
|
|
|
23
27
|
def is_reached(self) -> bool: ...
|
|
24
28
|
def clear_work(self) -> None: ...
|
|
25
29
|
|
|
26
|
-
@
|
|
27
|
-
|
|
30
|
+
@overload
|
|
31
|
+
@deprecated("MultiGraph and MultiDiGraph not supported (yet).")
|
|
32
|
+
def build_residual_network(G: MultiGraph[_Node], capacity, *, backend: str | None = None, **backend_kwargs) -> NoReturn: ...
|
|
33
|
+
@overload
|
|
34
|
+
def build_residual_network(G: Graph[_Node], capacity, *, backend: str | None = None, **backend_kwargs): ...
|
|
28
35
|
@_dispatchable
|
|
29
36
|
def detect_unboundedness(R, s, t) -> None: ...
|
|
30
37
|
@_dispatchable
|
|
31
|
-
def build_flow_dict(G, R): ...
|
|
38
|
+
def build_flow_dict(G: Graph[_Node], R): ...
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
from networkx.classes.digraph import DiGraph
|
|
2
|
+
from networkx.classes.graph import _Node
|
|
1
3
|
from networkx.utils.backends import _dispatchable
|
|
2
4
|
|
|
3
5
|
__all__ = ["flow_hierarchy"]
|
|
4
6
|
|
|
5
7
|
@_dispatchable
|
|
6
|
-
def flow_hierarchy(G, weight: str | None = None) -> float: ...
|
|
8
|
+
def flow_hierarchy(G: DiGraph[_Node], weight: str | None = None) -> float: ...
|
|
@@ -23,6 +23,6 @@ _Y_co = TypeVar("_Y_co", bound=Hashable, covariant=True)
|
|
|
23
23
|
@_dispatchable
|
|
24
24
|
def compose(G: Graph[_X_co], H: Graph[_Y_co]) -> DiGraph[_X_co | _Y_co]: ...
|
|
25
25
|
@_dispatchable
|
|
26
|
-
def full_join(G, H, rename=(None, None)): ...
|
|
26
|
+
def full_join(G: Graph[_Node], H, rename=(None, None)): ...
|
|
27
27
|
@_dispatchable
|
|
28
28
|
def union(G: Graph[_X_co], H: Graph[_Y_co], rename: Iterable[Incomplete] | None = ()) -> DiGraph[_X_co | _Y_co]: ...
|
|
@@ -34,4 +34,4 @@ def rooted_product(G: Graph[_X], H: Graph[_Y], root: _Y) -> Graph[tuple[_X, _Y]]
|
|
|
34
34
|
@_dispatchable
|
|
35
35
|
def corona_product(G: Graph[_X], H: Graph[_Y]) -> Graph[tuple[_X, _Y]]: ...
|
|
36
36
|
@_dispatchable
|
|
37
|
-
def modular_product(G, H) -> Graph[Incomplete]: ...
|
|
37
|
+
def modular_product(G: Graph[_Node], H) -> Graph[Incomplete]: ...
|
|
@@ -73,7 +73,7 @@ class LRPlanarity:
|
|
|
73
73
|
right_ref: Incomplete
|
|
74
74
|
embedding: Incomplete
|
|
75
75
|
|
|
76
|
-
def __init__(self, G) -> None: ...
|
|
76
|
+
def __init__(self, G: Graph[_Node]) -> None: ...
|
|
77
77
|
def lr_planarity(self) -> PlanarEmbedding[Incomplete] | None: ...
|
|
78
78
|
def lr_planarity_recursive(self): ...
|
|
79
79
|
def dfs_orientation(self, v): ...
|
|
@@ -39,7 +39,7 @@ def minimum_branching(
|
|
|
39
39
|
G: DiGraph[_Node], attr: str = "weight", default: float = 1, preserve_attrs: bool = False, partition: str | None = None
|
|
40
40
|
): ...
|
|
41
41
|
@_dispatchable
|
|
42
|
-
def minimal_branching(G, /, *, attr="weight", default=1, preserve_attrs=False, partition=None): ...
|
|
42
|
+
def minimal_branching(G: DiGraph[_Node], /, *, attr="weight", default=1, preserve_attrs=False, partition=None): ...
|
|
43
43
|
@_dispatchable
|
|
44
44
|
def maximum_spanning_arborescence(
|
|
45
45
|
G: DiGraph[_Node], attr: str = "weight", default: float = 1, preserve_attrs: bool = False, partition: str | None = None
|
|
@@ -63,7 +63,7 @@ class ArborescenceIterator:
|
|
|
63
63
|
partition_key: str
|
|
64
64
|
init_partition: Incomplete
|
|
65
65
|
|
|
66
|
-
def __init__(self, G, weight: str = "weight", minimum: bool = True, init_partition=None) -> None: ...
|
|
66
|
+
def __init__(self, G: DiGraph[_Node], weight: str = "weight", minimum: bool = True, init_partition=None) -> None: ...
|
|
67
67
|
partition_queue: Incomplete
|
|
68
68
|
|
|
69
69
|
def __iter__(self) -> Self: ...
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
from _typeshed import Incomplete
|
|
2
2
|
|
|
3
|
-
from networkx.classes.graph import Graph
|
|
3
|
+
from networkx.classes.graph import Graph, _Node
|
|
4
4
|
from networkx.utils.backends import _dispatchable
|
|
5
5
|
|
|
6
6
|
__all__ = ["junction_tree"]
|
|
7
7
|
|
|
8
8
|
@_dispatchable
|
|
9
|
-
def junction_tree(G) -> Graph[Incomplete]: ...
|
|
9
|
+
def junction_tree(G: Graph[_Node]) -> Graph[Incomplete]: ...
|
|
@@ -5,6 +5,7 @@ from enum import Enum
|
|
|
5
5
|
from typing import Final, Literal
|
|
6
6
|
from typing_extensions import Self
|
|
7
7
|
|
|
8
|
+
from networkx.classes.digraph import DiGraph
|
|
8
9
|
from networkx.classes.graph import Graph, _Node
|
|
9
10
|
from networkx.utils.backends import _dispatchable
|
|
10
11
|
from numpy.random import RandomState
|
|
@@ -79,11 +80,11 @@ class SpanningTreeIterator:
|
|
|
79
80
|
ignore_nan: Incomplete
|
|
80
81
|
partition_key: str
|
|
81
82
|
|
|
82
|
-
def __init__(self, G, weight: str = "weight", minimum: bool = True, ignore_nan: bool = False) -> None: ...
|
|
83
|
+
def __init__(self, G: DiGraph[_Node], weight: str = "weight", minimum: bool = True, ignore_nan: bool = False) -> None: ...
|
|
83
84
|
partition_queue: Incomplete
|
|
84
85
|
|
|
85
86
|
def __iter__(self) -> Self: ...
|
|
86
87
|
def __next__(self): ...
|
|
87
88
|
|
|
88
89
|
@_dispatchable
|
|
89
|
-
def number_of_spanning_trees(G, *, root=None, weight=None) -> float | Literal[0]: ...
|
|
90
|
+
def number_of_spanning_trees(G: Graph[_Node], *, root=None, weight=None) -> float | Literal[0]: ...
|
|
@@ -6,6 +6,6 @@ __all__ = ["wiener_index", "schultz_index", "gutman_index"]
|
|
|
6
6
|
@_dispatchable
|
|
7
7
|
def wiener_index(G: Graph[_Node], weight: str | None = None) -> float: ...
|
|
8
8
|
@_dispatchable
|
|
9
|
-
def schultz_index(G, weight=None) -> float: ...
|
|
9
|
+
def schultz_index(G: Graph[_Node], weight=None) -> float: ...
|
|
10
10
|
@_dispatchable
|
|
11
|
-
def gutman_index(G, weight=None) -> float: ...
|
|
11
|
+
def gutman_index(G: Graph[_Node], weight=None) -> float: ...
|
|
@@ -52,32 +52,32 @@ __all__ = [
|
|
|
52
52
|
|
|
53
53
|
_U = TypeVar("_U")
|
|
54
54
|
|
|
55
|
-
def nodes(G): ...
|
|
56
|
-
def edges(G, nbunch=None): ...
|
|
57
|
-
def degree(G, nbunch=None, weight=None): ...
|
|
58
|
-
def neighbors(G, n): ...
|
|
59
|
-
def number_of_nodes(G): ...
|
|
60
|
-
def number_of_edges(G): ...
|
|
61
|
-
def density(G): ...
|
|
62
|
-
def degree_histogram(G) -> list[int]: ...
|
|
55
|
+
def nodes(G: Graph[_Node]): ...
|
|
56
|
+
def edges(G: Graph[_Node], nbunch=None): ...
|
|
57
|
+
def degree(G: Graph[_Node], nbunch=None, weight=None): ...
|
|
58
|
+
def neighbors(G: Graph[_Node], n): ...
|
|
59
|
+
def number_of_nodes(G: Graph[_Node]): ...
|
|
60
|
+
def number_of_edges(G: Graph[_Node]): ...
|
|
61
|
+
def density(G: Graph[_Node]): ...
|
|
62
|
+
def degree_histogram(G: Graph[_Node]) -> list[int]: ...
|
|
63
63
|
@overload
|
|
64
64
|
def is_directed(G: PlanarEmbedding[Hashable]) -> Literal[False]: ... # type: ignore[misc] # Incompatible return types
|
|
65
65
|
@overload
|
|
66
66
|
def is_directed(G: DiGraph[Hashable]) -> Literal[True]: ... # type: ignore[misc] # Incompatible return types
|
|
67
67
|
@overload
|
|
68
68
|
def is_directed(G: Graph[Hashable]) -> Literal[False]: ...
|
|
69
|
-
def freeze(G): ...
|
|
69
|
+
def freeze(G: Graph[_Node]): ...
|
|
70
70
|
def is_frozen(G: Graph[Incomplete]) -> bool: ...
|
|
71
71
|
def add_star(G_to_add_to, nodes_for_star, **attr) -> None: ...
|
|
72
72
|
def add_path(G_to_add_to, nodes_for_path, **attr) -> None: ...
|
|
73
73
|
def add_cycle(G_to_add_to, nodes_for_cycle, **attr) -> None: ...
|
|
74
|
-
def subgraph(G, nbunch): ...
|
|
74
|
+
def subgraph(G: Graph[_Node], nbunch): ...
|
|
75
75
|
def induced_subgraph(G: Graph[_Node], nbunch: _NBunch[_Node]) -> Graph[_Node]: ...
|
|
76
|
-
def edge_subgraph(G, edges): ...
|
|
77
|
-
def restricted_view(G, nodes, edges): ...
|
|
76
|
+
def edge_subgraph(G: Graph[_Node], edges): ...
|
|
77
|
+
def restricted_view(G: Graph[_Node], nodes, edges): ...
|
|
78
78
|
def to_directed(graph): ...
|
|
79
79
|
def to_undirected(graph): ...
|
|
80
|
-
def create_empty_copy(G, with_data: bool = True): ...
|
|
80
|
+
def create_empty_copy(G: Graph[_Node], with_data: bool = True): ...
|
|
81
81
|
|
|
82
82
|
# incomplete: Can "Any scalar value" be enforced?
|
|
83
83
|
@overload
|
|
@@ -101,26 +101,33 @@ def set_node_attributes(
|
|
|
101
101
|
@_dispatchable
|
|
102
102
|
def get_node_attributes(G: Graph[_Node], name: str, default=None) -> dict[_Node, Incomplete]: ...
|
|
103
103
|
@_dispatchable
|
|
104
|
-
def remove_node_attributes(G, *attr_names, nbunch=None) -> None: ...
|
|
104
|
+
def remove_node_attributes(G: Graph[_Node], *attr_names, nbunch=None) -> None: ...
|
|
105
105
|
@overload
|
|
106
106
|
def set_edge_attributes(
|
|
107
107
|
G: Graph[_Node],
|
|
108
108
|
values: SupportsItems[tuple[_Node, _Node], Incomplete],
|
|
109
109
|
name: str,
|
|
110
110
|
*,
|
|
111
|
-
backend=None, # @_dispatchable adds these arguments, but we can't use this decorator with @overload
|
|
111
|
+
backend: str | None = None, # @_dispatchable adds these arguments, but we can't use this decorator with @overload
|
|
112
112
|
**backend_kwargs,
|
|
113
113
|
) -> None: ...
|
|
114
114
|
@overload
|
|
115
115
|
def set_edge_attributes(
|
|
116
|
-
G: MultiGraph[_Node],
|
|
116
|
+
G: MultiGraph[_Node],
|
|
117
|
+
values: dict[tuple[_Node, _Node, Incomplete], Incomplete],
|
|
118
|
+
name: str,
|
|
119
|
+
*,
|
|
120
|
+
backend: str | None = None,
|
|
121
|
+
**backend_kwargs,
|
|
117
122
|
) -> None: ...
|
|
118
123
|
@overload
|
|
119
|
-
def set_edge_attributes(
|
|
124
|
+
def set_edge_attributes(
|
|
125
|
+
G: Graph[Hashable], values, name: None = None, *, backend: str | None = None, **backend_kwargs
|
|
126
|
+
) -> None: ...
|
|
120
127
|
@_dispatchable
|
|
121
128
|
def get_edge_attributes(G: Graph[_Node], name: str, default=None) -> dict[tuple[_Node, _Node], Incomplete]: ...
|
|
122
129
|
@_dispatchable
|
|
123
|
-
def remove_edge_attributes(G, *attr_names, ebunch=None) -> None: ...
|
|
130
|
+
def remove_edge_attributes(G: Graph[_Node], *attr_names, ebunch=None) -> None: ...
|
|
124
131
|
def all_neighbors(graph: Graph[_Node], node: _Node) -> Iterator[_Node]: ...
|
|
125
132
|
def non_neighbors(graph: Graph[_Node], node: _Node) -> Generator[_Node, None, None]: ...
|
|
126
133
|
def non_edges(graph: Graph[_Node]) -> Generator[tuple[_Node, _Node], None, None]: ...
|
|
@@ -163,4 +170,4 @@ def selfloop_edges(
|
|
|
163
170
|
@_dispatchable
|
|
164
171
|
def number_of_selfloops(G: Graph[Hashable]) -> int: ...
|
|
165
172
|
def is_path(G: Graph[_Node], path: Iterable[Incomplete]) -> bool: ...
|
|
166
|
-
def path_weight(G, path, weight) -> int: ...
|
|
173
|
+
def path_weight(G: Graph[_Node], path, weight) -> int: ...
|
|
@@ -80,7 +80,7 @@ def from_pandas_edgelist(
|
|
|
80
80
|
edge_key: str | None = None,
|
|
81
81
|
) -> Graph[Incomplete]: ...
|
|
82
82
|
@_dispatchable
|
|
83
|
-
def to_scipy_sparse_array(G, nodelist=None, dtype=None, weight="weight", format="csr"): ...
|
|
83
|
+
def to_scipy_sparse_array(G: Graph[_Node], nodelist=None, dtype=None, weight="weight", format="csr"): ...
|
|
84
84
|
@_dispatchable
|
|
85
85
|
def from_scipy_sparse_array(A, parallel_edges=False, create_using=None, edge_attribute="weight"): ...
|
|
86
86
|
@_dispatchable
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
from networkx.classes.graph import Graph, _Node
|
|
1
2
|
from networkx.utils.backends import _dispatchable
|
|
2
3
|
|
|
3
4
|
__all__ = ["ego_graph"]
|
|
4
5
|
|
|
5
6
|
@_dispatchable
|
|
6
|
-
def ego_graph(G, n, radius: float = 1, center: bool = True, undirected: bool = False, distance=None): ...
|
|
7
|
+
def ego_graph(G: Graph[_Node], n, radius: float = 1, center: bool = True, undirected: bool = False, distance=None): ...
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from _typeshed import Incomplete
|
|
2
2
|
|
|
3
|
-
from networkx.classes.graph import Graph
|
|
3
|
+
from networkx.classes.graph import Graph, _Node
|
|
4
4
|
from networkx.utils.backends import _dispatchable
|
|
5
5
|
|
|
6
6
|
__all__ = [
|
|
@@ -15,7 +15,7 @@ __all__ = [
|
|
|
15
15
|
]
|
|
16
16
|
|
|
17
17
|
@_dispatchable
|
|
18
|
-
def geometric_edges(G, radius, p: float = 2): ...
|
|
18
|
+
def geometric_edges(G: Graph[_Node], radius, p: float = 2): ...
|
|
19
19
|
@_dispatchable
|
|
20
20
|
def random_geometric_graph(n, radius, dim: int = 2, pos=None, p: float = 2, seed=None): ...
|
|
21
21
|
@_dispatchable
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
from networkx.classes.graph import Graph, _Node
|
|
1
2
|
from networkx.utils.backends import _dispatchable
|
|
2
3
|
|
|
3
4
|
__all__ = ["line_graph", "inverse_line_graph"]
|
|
4
5
|
|
|
5
6
|
@_dispatchable
|
|
6
|
-
def line_graph(G, create_using=None): ...
|
|
7
|
+
def line_graph(G: Graph[_Node], create_using=None): ...
|
|
7
8
|
@_dispatchable
|
|
8
|
-
def inverse_line_graph(G): ...
|
|
9
|
+
def inverse_line_graph(G: Graph[_Node]): ...
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
from networkx.classes.graph import Graph, _Node
|
|
1
2
|
from networkx.utils.backends import _dispatchable
|
|
2
3
|
|
|
3
4
|
__all__ = ["mycielskian", "mycielski_graph"]
|
|
4
5
|
|
|
5
6
|
@_dispatchable
|
|
6
|
-
def mycielskian(G, iterations: int = 1): ...
|
|
7
|
+
def mycielskian(G: Graph[_Node], iterations: int = 1): ...
|
|
7
8
|
@_dispatchable
|
|
8
9
|
def mycielski_graph(n): ...
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
from _typeshed import Incomplete
|
|
2
2
|
|
|
3
|
+
from networkx.classes.graph import Graph, _Node
|
|
3
4
|
from networkx.utils.backends import _dispatchable
|
|
4
5
|
|
|
5
|
-
from ..classes.graph import Graph
|
|
6
|
-
|
|
7
6
|
__all__ = ["spectral_graph_forge"]
|
|
8
7
|
|
|
9
8
|
@_dispatchable
|
|
10
|
-
def spectral_graph_forge(G, alpha, transformation: str = "identity", seed=None) -> Graph[Incomplete]: ...
|
|
9
|
+
def spectral_graph_forge(G: Graph[_Node], alpha, transformation: str = "identity", seed=None) -> Graph[Incomplete]: ...
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
from networkx.classes.digraph import DiGraph
|
|
2
|
+
from networkx.classes.graph import _Node
|
|
1
3
|
from networkx.utils.backends import _dispatchable
|
|
2
4
|
|
|
3
5
|
__all__ = ["stochastic_graph"]
|
|
4
6
|
|
|
5
7
|
@_dispatchable
|
|
6
|
-
def stochastic_graph(G, copy: bool = True, weight: str = "weight"): ...
|
|
8
|
+
def stochastic_graph(G: DiGraph[_Node], copy: bool = True, weight: str = "weight"): ...
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
from collections.abc import Generator
|
|
2
2
|
|
|
3
|
+
from networkx.classes.graph import Graph, _Node
|
|
3
4
|
from networkx.utils.backends import _dispatchable
|
|
4
5
|
|
|
5
6
|
__all__ = ["generate_adjlist", "write_adjlist", "parse_adjlist", "read_adjlist"]
|
|
6
7
|
|
|
7
|
-
def generate_adjlist(G, delimiter: str = " ") -> Generator[str, None, None]: ...
|
|
8
|
-
def write_adjlist(G, path, comments: str = "#", delimiter: str = " ", encoding: str = "utf-8") -> None: ...
|
|
8
|
+
def generate_adjlist(G: Graph[_Node], delimiter: str = " ") -> Generator[str, None, None]: ...
|
|
9
|
+
def write_adjlist(G: Graph[_Node], path, comments: str = "#", delimiter: str = " ", encoding: str = "utf-8") -> None: ...
|
|
9
10
|
@_dispatchable
|
|
10
11
|
def parse_adjlist(lines, comments: str = "#", delimiter=None, create_using=None, nodetype=None): ...
|
|
11
12
|
@_dispatchable
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from _typeshed import Incomplete
|
|
2
2
|
from collections.abc import Generator
|
|
3
3
|
|
|
4
|
+
from networkx.classes.graph import Graph, _Node
|
|
4
5
|
from networkx.utils.backends import _dispatchable
|
|
5
6
|
|
|
6
7
|
__all__ = [
|
|
@@ -12,8 +13,10 @@ __all__ = [
|
|
|
12
13
|
"write_weighted_edgelist",
|
|
13
14
|
]
|
|
14
15
|
|
|
15
|
-
def generate_edgelist(G, delimiter: str = " ", data: bool = True) -> Generator[Incomplete, None, None]: ...
|
|
16
|
-
def write_edgelist(
|
|
16
|
+
def generate_edgelist(G: Graph[_Node], delimiter: str = " ", data: bool = True) -> Generator[Incomplete, None, None]: ...
|
|
17
|
+
def write_edgelist(
|
|
18
|
+
G: Graph[_Node], path, comments: str = "#", delimiter: str = " ", data: bool = True, encoding: str = "utf-8"
|
|
19
|
+
) -> None: ...
|
|
17
20
|
@_dispatchable
|
|
18
21
|
def parse_edgelist(lines, comments: str = "#", delimiter=None, create_using=None, nodetype=None, data: bool = True): ...
|
|
19
22
|
@_dispatchable
|
|
@@ -27,7 +30,9 @@ def read_edgelist(
|
|
|
27
30
|
edgetype=None,
|
|
28
31
|
encoding: str = "utf-8",
|
|
29
32
|
): ...
|
|
30
|
-
def write_weighted_edgelist(
|
|
33
|
+
def write_weighted_edgelist(
|
|
34
|
+
G: Graph[_Node], path, comments: str = "#", delimiter: str = " ", encoding: str = "utf-8"
|
|
35
|
+
) -> None: ...
|
|
31
36
|
@_dispatchable
|
|
32
37
|
def read_weighted_edgelist(
|
|
33
38
|
path, comments: str = "#", delimiter=None, create_using=None, nodetype=None, encoding: str = "utf-8"
|
|
@@ -2,13 +2,14 @@ from _typeshed import Incomplete
|
|
|
2
2
|
from collections.abc import Generator
|
|
3
3
|
from typing import Final, Literal
|
|
4
4
|
|
|
5
|
+
from networkx.classes.graph import Graph, _Node
|
|
5
6
|
from networkx.utils.backends import _dispatchable
|
|
6
7
|
|
|
7
8
|
__all__ = ["write_gexf", "read_gexf", "relabel_gexf_graph", "generate_gexf"]
|
|
8
9
|
|
|
9
|
-
def write_gexf(G, path, encoding: str = "utf-8", prettyprint: bool = True, version: str = "1.2draft") -> None: ...
|
|
10
|
+
def write_gexf(G: Graph[_Node], path, encoding: str = "utf-8", prettyprint: bool = True, version: str = "1.2draft") -> None: ...
|
|
10
11
|
def generate_gexf(
|
|
11
|
-
G, encoding: str = "utf-8", prettyprint: bool = True, version: str = "1.2draft"
|
|
12
|
+
G: Graph[_Node], encoding: str = "utf-8", prettyprint: bool = True, version: str = "1.2draft"
|
|
12
13
|
) -> Generator[Incomplete, Incomplete, None]: ...
|
|
13
14
|
@_dispatchable
|
|
14
15
|
def read_gexf(path, node_type=None, relabel: bool = False, version: str = "1.2draft"): ...
|
|
@@ -37,9 +38,9 @@ class GEXFWriter(GEXF):
|
|
|
37
38
|
attr: Incomplete
|
|
38
39
|
def __init__(self, graph=None, encoding: str = "utf-8", prettyprint: bool = True, version: str = "1.2draft") -> None: ...
|
|
39
40
|
graph_element: Incomplete
|
|
40
|
-
def add_graph(self, G) -> None: ...
|
|
41
|
-
def add_nodes(self, G, graph_element) -> None: ...
|
|
42
|
-
def add_edges(self, G, graph_element) -> None: ...
|
|
41
|
+
def add_graph(self, G: Graph[_Node]) -> None: ...
|
|
42
|
+
def add_nodes(self, G: Graph[_Node], graph_element) -> None: ...
|
|
43
|
+
def add_edges(self, G: Graph[_Node], graph_element) -> None: ...
|
|
43
44
|
def add_attributes(self, node_or_edge, xml_obj, data, default): ...
|
|
44
45
|
def get_attr_id(self, title, attr_type, edge_or_node, default, mode): ...
|
|
45
46
|
def add_viz(self, element, node_data): ...
|
|
@@ -58,14 +59,14 @@ class GEXFReader(GEXF):
|
|
|
58
59
|
def __call__(self, stream): ...
|
|
59
60
|
timeformat: Incomplete
|
|
60
61
|
def make_graph(self, graph_xml): ...
|
|
61
|
-
def add_node(self, G, node_xml, node_attr, node_pid=None) -> None: ...
|
|
62
|
+
def add_node(self, G: Graph[_Node], node_xml, node_attr, node_pid=None) -> None: ...
|
|
62
63
|
def add_start_end(self, data, xml): ...
|
|
63
64
|
def add_viz(self, data, node_xml): ...
|
|
64
65
|
def add_parents(self, data, node_xml): ...
|
|
65
66
|
def add_slices(self, data, node_or_edge_xml): ...
|
|
66
67
|
def add_spells(self, data, node_or_edge_xml): ...
|
|
67
|
-
def add_edge(self, G, edge_element, edge_attr) -> None: ...
|
|
68
|
+
def add_edge(self, G: Graph[_Node], edge_element, edge_attr) -> None: ...
|
|
68
69
|
def decode_attr_elements(self, gexf_keys, obj_xml): ...
|
|
69
70
|
def find_gexf_attributes(self, attributes_element): ...
|
|
70
71
|
|
|
71
|
-
def relabel_gexf_graph(G): ...
|
|
72
|
+
def relabel_gexf_graph(G: Graph[_Node]): ...
|
|
@@ -3,6 +3,7 @@ from collections.abc import Generator
|
|
|
3
3
|
from enum import Enum
|
|
4
4
|
from typing import Final, Generic, NamedTuple, TypeVar
|
|
5
5
|
|
|
6
|
+
from networkx.classes.graph import Graph, _Node
|
|
6
7
|
from networkx.utils.backends import _dispatchable
|
|
7
8
|
|
|
8
9
|
_T = TypeVar("_T")
|
|
@@ -36,5 +37,5 @@ LIST_START_VALUE: Final = "_networkx_list_start"
|
|
|
36
37
|
|
|
37
38
|
def parse_gml_lines(lines, label, destringizer): ...
|
|
38
39
|
def literal_stringizer(value) -> str: ...
|
|
39
|
-
def generate_gml(G, stringizer=None) -> Generator[Incomplete, Incomplete, None]: ...
|
|
40
|
-
def write_gml(G, path, stringizer=None) -> None: ...
|
|
40
|
+
def generate_gml(G: Graph[_Node], stringizer=None) -> Generator[Incomplete, Incomplete, None]: ...
|
|
41
|
+
def write_gml(G: Graph[_Node], path, stringizer=None) -> None: ...
|
|
@@ -8,10 +8,10 @@ __all__ = ["from_graph6_bytes", "read_graph6", "to_graph6_bytes", "write_graph6"
|
|
|
8
8
|
|
|
9
9
|
@_dispatchable
|
|
10
10
|
def from_graph6_bytes(bytes_in) -> Graph[Incomplete]: ...
|
|
11
|
-
def to_graph6_bytes(G, nodes=None, header: bool = True): ...
|
|
11
|
+
def to_graph6_bytes(G: Graph[_Node], nodes=None, header: bool = True): ...
|
|
12
12
|
@_dispatchable
|
|
13
13
|
def read_graph6(path): ...
|
|
14
|
-
def write_graph6(G, path, nodes=None, header: bool = True): ...
|
|
14
|
+
def write_graph6(G: Graph[_Node], path, nodes=None, header: bool = True): ...
|
|
15
15
|
def write_graph6_file(G: Graph[_Node], f, nodes: Iterable[Incomplete] | None = None, header: bool = True): ...
|
|
16
16
|
def data_to_n(data): ...
|
|
17
17
|
def n_to_data(n): ...
|
|
@@ -2,6 +2,7 @@ from _typeshed import Incomplete
|
|
|
2
2
|
from collections.abc import Generator
|
|
3
3
|
from typing import Final, Literal
|
|
4
4
|
|
|
5
|
+
from networkx.classes.graph import Graph, _Node
|
|
5
6
|
from networkx.utils.backends import _dispatchable
|
|
6
7
|
|
|
7
8
|
__all__ = [
|
|
@@ -16,7 +17,7 @@ __all__ = [
|
|
|
16
17
|
]
|
|
17
18
|
|
|
18
19
|
def write_graphml_xml(
|
|
19
|
-
G,
|
|
20
|
+
G: Graph[_Node],
|
|
20
21
|
path,
|
|
21
22
|
encoding: str = "utf-8",
|
|
22
23
|
prettyprint: bool = True,
|
|
@@ -25,7 +26,7 @@ def write_graphml_xml(
|
|
|
25
26
|
edge_id_from_attribute=None,
|
|
26
27
|
) -> None: ...
|
|
27
28
|
def write_graphml_lxml(
|
|
28
|
-
G,
|
|
29
|
+
G: Graph[_Node],
|
|
29
30
|
path,
|
|
30
31
|
encoding: str = "utf-8",
|
|
31
32
|
prettyprint: bool = True,
|
|
@@ -34,7 +35,7 @@ def write_graphml_lxml(
|
|
|
34
35
|
edge_id_from_attribute=None,
|
|
35
36
|
): ...
|
|
36
37
|
def generate_graphml(
|
|
37
|
-
G, encoding: str = "utf-8", prettyprint: bool = True, named_key_ids: bool = False, edge_id_from_attribute=None
|
|
38
|
+
G: Graph[_Node], encoding: str = "utf-8", prettyprint: bool = True, named_key_ids: bool = False, edge_id_from_attribute=None
|
|
38
39
|
) -> Generator[Incomplete, Incomplete, None]: ...
|
|
39
40
|
@_dispatchable
|
|
40
41
|
def read_graphml(path, node_type=..., edge_key_type=..., force_multigraph: bool = False): ...
|
|
@@ -76,9 +77,9 @@ class GraphMLWriter(GraphML):
|
|
|
76
77
|
def get_key(self, name, attr_type, scope, default): ...
|
|
77
78
|
def add_data(self, name, element_type, value, scope: str = "all", default=None): ...
|
|
78
79
|
def add_attributes(self, scope, xml_obj, data, default) -> None: ...
|
|
79
|
-
def add_nodes(self, G, graph_element) -> None: ...
|
|
80
|
-
def add_edges(self, G, graph_element) -> None: ...
|
|
81
|
-
def add_graph_element(self, G) -> None: ...
|
|
80
|
+
def add_nodes(self, G: Graph[_Node], graph_element) -> None: ...
|
|
81
|
+
def add_edges(self, G: Graph[_Node], graph_element) -> None: ...
|
|
82
|
+
def add_graph_element(self, G: Graph[_Node]) -> None: ...
|
|
82
83
|
def add_graphs(self, graph_list) -> None: ...
|
|
83
84
|
def dump(self, stream) -> None: ...
|
|
84
85
|
def indent(self, elem, level: int = 0) -> None: ...
|
|
@@ -107,7 +108,7 @@ class GraphMLWriterLxml(GraphMLWriter):
|
|
|
107
108
|
named_key_ids: bool = False,
|
|
108
109
|
edge_id_from_attribute=None,
|
|
109
110
|
) -> None: ...
|
|
110
|
-
def add_graph_element(self, G) -> None: ...
|
|
111
|
+
def add_graph_element(self, G: Graph[_Node]) -> None: ...
|
|
111
112
|
def add_attributes(self, scope, xml_obj, data, default) -> None: ...
|
|
112
113
|
def dump(self, stream=None) -> None: ...
|
|
113
114
|
|
|
@@ -122,7 +123,7 @@ class GraphMLReader(GraphML):
|
|
|
122
123
|
xml: Incomplete
|
|
123
124
|
def __call__(self, path=None, string=None) -> Generator[Incomplete, None, None]: ...
|
|
124
125
|
def make_graph(self, graph_xml, graphml_keys, defaults, G=None): ...
|
|
125
|
-
def add_node(self, G, node_xml, graphml_keys, defaults) -> None: ...
|
|
126
|
-
def add_edge(self, G, edge_element, graphml_keys) -> None: ...
|
|
126
|
+
def add_node(self, G: Graph[_Node], node_xml, graphml_keys, defaults) -> None: ...
|
|
127
|
+
def add_edge(self, G: Graph[_Node], edge_element, graphml_keys) -> None: ...
|
|
127
128
|
def decode_data_elements(self, graphml_keys, obj_xml): ...
|
|
128
129
|
def find_graphml_keys(self, graph_element): ...
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
from typing import Any
|
|
2
2
|
|
|
3
|
+
from networkx.classes.graph import Graph, _Node
|
|
3
4
|
from networkx.utils.backends import _dispatchable
|
|
4
5
|
|
|
5
6
|
__all__ = ["adjacency_data", "adjacency_graph"]
|
|
6
7
|
|
|
7
8
|
# Any: Complex type union
|
|
8
|
-
def adjacency_data(G, attrs={"id": "id", "key": "key"}) -> dict[str, Any]: ...
|
|
9
|
+
def adjacency_data(G: Graph[_Node], attrs={"id": "id", "key": "key"}) -> dict[str, Any]: ...
|
|
9
10
|
@_dispatchable
|
|
10
11
|
def adjacency_graph(data, directed: bool = False, multigraph: bool = True, attrs={"id": "id", "key": "key"}): ...
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
from typing import Any
|
|
2
2
|
|
|
3
|
+
from networkx.classes.graph import Graph, _Node
|
|
3
4
|
from networkx.utils.backends import _dispatchable
|
|
4
5
|
|
|
5
6
|
__all__ = ["cytoscape_data", "cytoscape_graph"]
|
|
6
7
|
|
|
7
8
|
# Any: Complex type union
|
|
8
|
-
def cytoscape_data(G, name: str = "name", ident: str = "id") -> dict[str, Any]: ...
|
|
9
|
+
def cytoscape_data(G: Graph[_Node], name: str = "name", ident: str = "id") -> dict[str, Any]: ...
|
|
9
10
|
@_dispatchable
|
|
10
11
|
def cytoscape_graph(data, name: str = "name", ident: str = "id"): ...
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
+
from typing import overload
|
|
2
|
+
from typing_extensions import deprecated
|
|
3
|
+
|
|
4
|
+
from networkx.classes.graph import Graph, _Node
|
|
1
5
|
from networkx.utils.backends import _dispatchable
|
|
2
6
|
|
|
3
7
|
__all__ = ["node_link_data", "node_link_graph"]
|
|
4
8
|
|
|
9
|
+
@overload
|
|
10
|
+
@deprecated(
|
|
11
|
+
"""\
|
|
12
|
+
The `link` argument is deprecated and will be removed in version `3.6`.
|
|
13
|
+
Use the `edges` keyword instead."""
|
|
14
|
+
)
|
|
5
15
|
def node_link_data(
|
|
6
|
-
G,
|
|
16
|
+
G: Graph[_Node],
|
|
7
17
|
*,
|
|
8
18
|
source: str = "source",
|
|
9
19
|
target: str = "target",
|
|
@@ -13,6 +23,17 @@ def node_link_data(
|
|
|
13
23
|
nodes: str = "nodes",
|
|
14
24
|
link: str | None = None,
|
|
15
25
|
): ...
|
|
26
|
+
@overload
|
|
27
|
+
def node_link_data(
|
|
28
|
+
G: Graph[_Node],
|
|
29
|
+
*,
|
|
30
|
+
source: str = "source",
|
|
31
|
+
target: str = "target",
|
|
32
|
+
name: str = "id",
|
|
33
|
+
key: str = "key",
|
|
34
|
+
edges: str | None = None,
|
|
35
|
+
nodes: str = "nodes",
|
|
36
|
+
): ...
|
|
16
37
|
@_dispatchable
|
|
17
38
|
def node_link_graph(
|
|
18
39
|
data,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
from networkx.classes.digraph import DiGraph
|
|
2
|
+
from networkx.classes.graph import _Node
|
|
1
3
|
from networkx.utils.backends import _dispatchable
|
|
2
4
|
|
|
3
5
|
__all__ = ["tree_data", "tree_graph"]
|
|
4
6
|
|
|
5
|
-
def tree_data(G, root, ident: str = "id", children: str = "children"): ...
|
|
7
|
+
def tree_data(G: DiGraph[_Node], root, ident: str = "id", children: str = "children"): ...
|
|
6
8
|
@_dispatchable
|
|
7
9
|
def tree_graph(data, ident: str = "id", children: str = "children"): ...
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
from collections.abc import Generator
|
|
2
2
|
|
|
3
|
+
from networkx.classes.graph import Graph, _Node
|
|
3
4
|
from networkx.utils.backends import _dispatchable
|
|
4
5
|
|
|
5
6
|
__all__ = ["generate_multiline_adjlist", "write_multiline_adjlist", "parse_multiline_adjlist", "read_multiline_adjlist"]
|
|
6
7
|
|
|
7
|
-
def generate_multiline_adjlist(G, delimiter: str = " ") -> Generator[str, None, None]: ...
|
|
8
|
-
def write_multiline_adjlist(G, path, delimiter=" ", comments="#", encoding="utf-8") -> None: ...
|
|
8
|
+
def generate_multiline_adjlist(G: Graph[_Node], delimiter: str = " ") -> Generator[str, None, None]: ...
|
|
9
|
+
def write_multiline_adjlist(G: Graph[_Node], path, delimiter=" ", comments="#", encoding="utf-8") -> None: ...
|
|
9
10
|
@_dispatchable
|
|
10
11
|
def parse_multiline_adjlist(lines, comments: str = "#", delimiter=None, create_using=None, nodetype=None, edgetype=None): ...
|
|
11
12
|
@_dispatchable
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
from _typeshed import Incomplete
|
|
2
2
|
|
|
3
|
+
from networkx.classes.graph import Graph, _Node
|
|
4
|
+
from networkx.classes.multidigraph import MultiDiGraph
|
|
3
5
|
from networkx.utils.backends import _dispatchable
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def write_p2g(G, path, encoding: str = "utf-8") -> None: ...
|
|
7
|
+
def write_p2g(G: Graph[_Node], path, encoding: str = "utf-8") -> None: ...
|
|
8
8
|
@_dispatchable
|
|
9
9
|
def read_p2g(path, encoding: str = "utf-8") -> MultiDiGraph[Incomplete]: ...
|
|
10
10
|
@_dispatchable
|