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
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Fixed the return type annotation of
:func:`~rustworkx.visualization.graphviz_draw` to use ``PIL.Image.Image``
instead of ``PIL.Image``.
6 changes: 3 additions & 3 deletions rustworkx/visualization/graphviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def graphviz_draw(
filename: str | None = None,
image_type: str | None = None,
method: str | None = None,
) -> Image | None:
) -> Image.Image | None:
"""Draw a :class:`~rustworkx.PyGraph` or :class:`~rustworkx.PyDiGraph` object
using graphviz

Expand Down Expand Up @@ -133,11 +133,11 @@ def graphviz_draw(
more details on the different layout methods. By default ``'dot'`` is
used.

:returns: A ``PIL.Image`` object of the generated visualization, if
:returns: A ``PIL.Image.Image`` object of the generated visualization, if
``filename`` is not specified. If ``filename`` is specified then
``None`` will be returned as the visualization was written to the
path specified in ``filename``
:rtype: PIL.Image
:rtype: PIL.Image.Image

.. jupyter-execute::

Expand Down
Loading