Skip to content

Commit

Permalink
Allow partial kwargs in mpl_draw (#1180)
Browse files Browse the repository at this point in the history
* Allow partial kwargs in mpl_draw

* Add release note as well
  • Loading branch information
IvanIsCoding committed Apr 30, 2024
1 parent 8642906 commit cc2c396
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Fixed a bug in the type hint for the :func:`~rustworkx.visualization.mpl_draw`.
Previously, all `kwargs` were required when calling the method. The new annotation
accepts `kwargs` with partial arguments.
2 changes: 1 addition & 1 deletion rustworkx/visualization/matplotlib.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if typing.TYPE_CHECKING:
_S = typing.TypeVar("_S")
_T = typing.TypeVar("_T")

class _DrawKwargs(typing.TypedDict):
class _DrawKwargs(typing.TypedDict, total=False):
arrowstyle: str
arrow_size: int
node_list: list[int]
Expand Down

0 comments on commit cc2c396

Please sign in to comment.