Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix node_link_json type annotation #1247

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
@@ -0,0 +1,6 @@
---
fixes:
- |
Fixed a bug in the type hint for :func:`~rustworkx.node_link_json`.
Refer to `issue 1243 <https://github.com/Qiskit/rustworkx/issues/1243>`__ for
more information.
4 changes: 2 additions & 2 deletions rustworkx/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ def node_link_json(
graph: PyGraph[_S, _T] | PyDiGraph[_S, _T],
path: str | None = ...,
graph_attrs: Callable[[Any], dict[str, str]] | None = ...,
node_attrs: Callable[[_S], str] | None = ...,
edge_attrs: Callable[[_T], str] | None = ...,
node_attrs: Callable[[_S], dict[str, str]] | None = ...,
edge_attrs: Callable[[_T], dict[str, str]] | None = ...,
) -> str | None: ...
def longest_simple_path(graph: PyGraph[_S, _T] | PyDiGraph[_S, _T]) -> NodeIndices | None: ...
def isolates(graph: PyGraph[_S, _T] | PyDiGraph[_S, _T]) -> NodeIndices: ...
Expand Down
8 changes: 4 additions & 4 deletions rustworkx/rustworkx.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -634,16 +634,16 @@ def digraph_node_link_json(
/,
path: str | None = ...,
graph_attrs: Callable[[Any], dict[str, str]] | None = ...,
node_attrs: Callable[[_S], str] | None = ...,
edge_attrs: Callable[[_T], str] | None = ...,
node_attrs: Callable[[_S], dict[str, str]] | None = ...,
edge_attrs: Callable[[_T], dict[str, str]] | None = ...,
) -> str | None: ...
def graph_node_link_json(
graph: PyGraph[_S, _T],
/,
path: str | None = ...,
graph_attrs: Callable[[Any], dict[str, str]] | None = ...,
node_attrs: Callable[[_S], str] | None = ...,
edge_attrs: Callable[[_T], str] | None = ...,
node_attrs: Callable[[_S], dict[str, str]] | None = ...,
edge_attrs: Callable[[_T], dict[str, str]] | None = ...,
) -> str | None: ...
def parse_node_link_json(
data: str,
Expand Down