Skip to content

Commit 0fe0781

Browse files
committed
make Method and ImageType private to satisfy mypy.stubtest
1 parent 598c9d4 commit 0fe0781

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

rustworkx/visualization/graphviz.pyi

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ import typing
1010
from rustworkx.rustworkx import PyGraph, PyDiGraph
1111

1212
if typing.TYPE_CHECKING:
13+
from typing_extensions import TypeAlias
1314
from PIL.Image import Image
1415

15-
Method: typing.TypeAlias = typing.Literal["twopi", "neato", "circo", "fdp", "sfdp", "dot"]
16-
ImageType: typing.TypeAlias = typing.Literal[
16+
_Method: TypeAlias = typing.Literal["twopi", "neato", "circo", "fdp", "sfdp", "dot"]
17+
_ImageType: TypeAlias = typing.Literal[
1718
"canon",
1819
"cmap",
1920
"cmapx",
@@ -61,8 +62,8 @@ def graphviz_draw(
6162
edge_attr_fn: typing.Callable[[_T], dict[str, str]] | None = ...,
6263
graph_attr: dict[str, str] | None = ...,
6364
filename: None = ...,
64-
image_type: ImageType | None = ...,
65-
method: Method | None = ...,
65+
image_type: _ImageType | None = ...,
66+
method: _Method | None = ...,
6667
) -> Image: ...
6768
@typing.overload
6869
def graphviz_draw(
@@ -71,6 +72,6 @@ def graphviz_draw(
7172
edge_attr_fn: typing.Callable[[_T], dict[str, str]] | None = ...,
7273
graph_attr: dict[str, str] | None = ...,
7374
filename: str = ...,
74-
image_type: ImageType | None = ...,
75-
method: Method | None = ...,
75+
image_type: _ImageType | None = ...,
76+
method: _Method | None = ...,
7677
) -> None: ...

0 commit comments

Comments
 (0)