Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from _typeshed import Incomplete, SupportsLenAndGetItem
from collections.abc import Callable, Mapping
from typing import Any, TypeVar
from collections.abc import Callable, Iterable, Mapping
from typing import Any, Literal, TypeVar

from networkx.classes.digraph import DiGraph
from networkx.classes.graph import Graph, _Node
Expand Down Expand Up @@ -57,7 +57,7 @@ def simulated_annealing_tsp(
@_dispatchable
def threshold_accepting_tsp(
G: Graph[_Node],
init_cycle,
init_cycle: Literal["greedy"] | Iterable[Incomplete],
weight: str | None = "weight",
source=None,
threshold: int | None = 1,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from _typeshed import Incomplete
from collections.abc import Iterable
from typing import Literal

from networkx.classes.graph import Graph, _Node
from networkx.utils.backends import _dispatchable
Expand All @@ -8,5 +9,9 @@ __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
G: Graph[_Node],
source: Literal["in+out", "out", "in"] = "in+out",
target: Literal["in+out", "out", "in"] = "in+out",
nodes: Iterable[Incomplete] | None = None,
weight: str | None = None,
) -> dict[Incomplete, int | float]: ...
3 changes: 2 additions & 1 deletion stubs/networkx/networkx/readwrite/gexf.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from _typeshed import Incomplete
from collections.abc import Generator
from typing import Final, Literal

from networkx.utils.backends import _dispatchable

Expand All @@ -17,7 +18,7 @@ class GEXF:
xml_type: Incomplete
python_type: Incomplete
def construct_types(self) -> None: ...
convert_bool: Incomplete
convert_bool: Final[dict[Literal["true", "false", "True", "False", "0", 0, "1", 1], bool]]
NS_GEXF: Incomplete
NS_VIZ: Incomplete
NS_XSI: Incomplete
Expand Down
4 changes: 2 additions & 2 deletions stubs/networkx/networkx/readwrite/graphml.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from _typeshed import Incomplete
from collections.abc import Generator
from typing import Final
from typing import Final, Literal

from networkx.utils.backends import _dispatchable

Expand Down Expand Up @@ -49,7 +49,7 @@ class GraphML:
xml_type: Incomplete
python_type: Incomplete
def construct_types(self) -> None: ...
convert_bool: Incomplete
convert_bool: Final[dict[Literal["true", "false", "0", 0, "1", 1], bool]]
def get_xml_type(self, key): ...

class GraphMLWriter(GraphML):
Expand Down
Loading