Skip to content

Commit

Permalink
Fix node_link_json type annotation (#1247)
Browse files Browse the repository at this point in the history
* Fix node_link_json type annotations

* Add release notes

* Try to fix link

* Try to fix merge queue hanging
  • Loading branch information
IvanIsCoding authored Sep 30, 2024
1 parent e9e49f0 commit 6096c8f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ main, 'stable/*' ]
pull_request:
branches: [ main, 'stable/*' ]
merge_group:
concurrency:
group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}
cancel-in-progress: true
Expand Down
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

0 comments on commit 6096c8f

Please sign in to comment.