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
9 changes: 4 additions & 5 deletions src/bipart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,9 @@ Return a const iterator yielding the indices of the blocks.
Constant.

:returns:
A value of type :any:`Iterator`.

An iterator yielding the indices of blocks.
:rtype:
iterator
Iterator[int]
)pbdoc");
thing.def("degree",
&Blocks::degree,
Expand Down Expand Up @@ -318,9 +317,9 @@ Return an iterator yielding the indices of the blocks.
Constant.

:returns:
A value of type :any:`Iterator`.
An iterator yielding the indices of the blocks.
:rtype:
Iterator
Iterator[int]
)pbdoc");
thing.def("degree",
&Bipartition::degree,
Expand Down
4 changes: 2 additions & 2 deletions src/libsemigroups_pybind11/froidure_pin.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def __getitem__(self: _Self, i: int) -> Element:
self._raise_if_element_not_implemented()
return _to_py(_to_cxx(self)[i])

def __iter__(self: _Self) -> Iterator:
def __iter__(self: _Self) -> Iterator[Element]:
self._raise_if_element_not_implemented()
return map(_to_py, iter(_to_cxx(self)))

Expand Down Expand Up @@ -209,7 +209,7 @@ def idempotents( # pylint: disable=missing-function-docstring
@_copydoc(_FroidurePinPBR.sorted_elements)
def sorted_elements( # pylint: disable=missing-function-docstring
self: _Self,
) -> Iterator:
) -> Iterator[Element]:
self._raise_if_element_not_implemented()
return map(
_to_py,
Expand Down
4 changes: 2 additions & 2 deletions src/libsemigroups_pybind11/konieczny.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,15 @@ def generators(self: Self) -> Iterator[Element]:
)

@_copydoc(_KoniecznyBMat.current_D_classes)
def current_D_classes(self: Self) -> Iterator:
def current_D_classes(self: Self) -> Iterator[DClass]:
# pylint: disable=missing-function-docstring,invalid-name
return map(
_to_py,
_to_cxx(self).current_D_classes(),
)

@_copydoc(_KoniecznyBMat.D_classes)
def D_classes(self: Self) -> Iterator:
def D_classes(self: Self) -> Iterator[DClass]:
# pylint: disable=missing-function-docstring,invalid-name
return map(
_to_py,
Expand Down
10 changes: 5 additions & 5 deletions src/word-graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ This function returns an iterator yielding the nodes of
the word graph.

:returns:
An :any:`Iterator`.
An iterator yielding the nodes.

:rtype:
Iterator
Iterator[int]

:complexity:
Constant.)pbdoc");
Expand Down Expand Up @@ -221,8 +221,8 @@ to the source node *source*. This target might equal :any:`UNDEFINED`.
:param source: the source node in the word graph.
:type source: int

:returns: An :any:`Iterator`.
:rtype: Iterator
:returns: An iterator yielding the targets.
:rtype: Iterator[int | Undefined]

:raises LibsemigroupsError:
if *source* is out of range (i.e. greater than or equal to
Expand Down Expand Up @@ -331,7 +331,7 @@ targets of edges with source *source*.
:type source: int

:returns: An iterator.
:rtype: Iterator
:rtype: Iterator[tuple[int, int | Undefined]]

:raises LibsemigroupsError: if *source* is out of bounds.)pbdoc");
thing.def(
Expand Down