Skip to content

Commit 74c7bd1

Browse files
committed
Fix missing imports in docstrings.
These were being included in the module imports before, but I'd rather have them here or in conftest.py.
1 parent 684ae53 commit 74c7bd1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tcod/path.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,7 @@ def traversal(self) -> NDArray[Any]:
11311131
Example::
11321132
11331133
# This example demonstrates the purpose of the traversal array.
1134+
>>> import tcod.path
11341135
>>> graph = tcod.path.SimpleGraph(
11351136
... cost=np.ones((5, 5), np.int8), cardinal=2, diagonal=3,
11361137
... )
@@ -1240,6 +1241,7 @@ def resolve(self, goal: tuple[int, ...] | None = None) -> None:
12401241
12411242
Example::
12421243
1244+
>>> import tcod.path
12431245
>>> graph = tcod.path.SimpleGraph(
12441246
... cost=np.ones((4, 4), np.int8), cardinal=2, diagonal=3,
12451247
... )
@@ -1300,6 +1302,7 @@ def path_from(self, index: tuple[int, ...]) -> NDArray[Any]:
13001302
13011303
Example::
13021304
1305+
>>> import tcod.path
13031306
>>> cost = np.ones((5, 5), dtype=np.int8)
13041307
>>> cost[:, 3:] = 0
13051308
>>> graph = tcod.path.SimpleGraph(cost=cost, cardinal=2, diagonal=3)
@@ -1344,6 +1347,7 @@ def path_to(self, index: tuple[int, ...]) -> NDArray[Any]:
13441347
13451348
Example::
13461349
1350+
>>> import tcod.path
13471351
>>> graph = tcod.path.SimpleGraph(
13481352
... cost=np.ones((5, 5), np.int8), cardinal=2, diagonal=3,
13491353
... )

0 commit comments

Comments
 (0)