Skip to content

Commit a9aeaef

Browse files
authored
Fix layers type annotations (#1341)
* Fix layers type annotations * Add release notes
1 parent 05e1d29 commit a9aeaef

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
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.layers`
5+
Refer to `issue 1340 <https://github.com/Qiskit/rustworkx/issues/1340>`__ for
6+
more information.

rustworkx/rustworkx.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def layers(
321321
first_layer: list[int],
322322
/,
323323
index_output: bool = ...,
324-
) -> list[_S] | list[int]: ...
324+
) -> list[list[_S]] | list[list[int]]: ...
325325
@final
326326
class TopologicalSorter:
327327
def __init__(

0 commit comments

Comments
 (0)