Skip to content

Commit 6096c8f

Browse files
authored
Fix node_link_json type annotation (#1247)
* Fix node_link_json type annotations * Add release notes * Try to fix link * Try to fix merge queue hanging
1 parent e9e49f0 commit 6096c8f

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [ main, 'stable/*' ]
66
pull_request:
77
branches: [ main, 'stable/*' ]
8+
merge_group:
89
concurrency:
910
group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}
1011
cancel-in-progress: true
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
fixes:
3+
- |
4+
Fixed a bug in the type hint for :func:`~rustworkx.node_link_json`.
5+
Refer to `issue 1243 <https://github.com/Qiskit/rustworkx/issues/1243>`__ for
6+
more information.

rustworkx/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,8 +602,8 @@ def node_link_json(
602602
graph: PyGraph[_S, _T] | PyDiGraph[_S, _T],
603603
path: str | None = ...,
604604
graph_attrs: Callable[[Any], dict[str, str]] | None = ...,
605-
node_attrs: Callable[[_S], str] | None = ...,
606-
edge_attrs: Callable[[_T], str] | None = ...,
605+
node_attrs: Callable[[_S], dict[str, str]] | None = ...,
606+
edge_attrs: Callable[[_T], dict[str, str]] | None = ...,
607607
) -> str | None: ...
608608
def longest_simple_path(graph: PyGraph[_S, _T] | PyDiGraph[_S, _T]) -> NodeIndices | None: ...
609609
def isolates(graph: PyGraph[_S, _T] | PyDiGraph[_S, _T]) -> NodeIndices: ...

rustworkx/rustworkx.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -634,16 +634,16 @@ def digraph_node_link_json(
634634
/,
635635
path: str | None = ...,
636636
graph_attrs: Callable[[Any], dict[str, str]] | None = ...,
637-
node_attrs: Callable[[_S], str] | None = ...,
638-
edge_attrs: Callable[[_T], str] | None = ...,
637+
node_attrs: Callable[[_S], dict[str, str]] | None = ...,
638+
edge_attrs: Callable[[_T], dict[str, str]] | None = ...,
639639
) -> str | None: ...
640640
def graph_node_link_json(
641641
graph: PyGraph[_S, _T],
642642
/,
643643
path: str | None = ...,
644644
graph_attrs: Callable[[Any], dict[str, str]] | None = ...,
645-
node_attrs: Callable[[_S], str] | None = ...,
646-
edge_attrs: Callable[[_T], str] | None = ...,
645+
node_attrs: Callable[[_S], dict[str, str]] | None = ...,
646+
edge_attrs: Callable[[_T], dict[str, str]] | None = ...,
647647
) -> str | None: ...
648648
def parse_node_link_json(
649649
data: str,

0 commit comments

Comments
 (0)