Skip to content

Commit 5726f0d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 60ea79c commit 5726f0d

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

build_libtcod.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
sys.path.append(str(Path(__file__).parent)) # Allow importing local modules.
1717

18-
import build_sdl # noqa: E402
18+
import build_sdl
1919

2020
Py_LIMITED_API = 0x03060000
2121

examples/samples_tcod.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -768,12 +768,11 @@ def on_draw(self) -> None:
768768
libtcodpy.console_put_char(sample_console, self.px, self.py, " ", libtcodpy.BKGND_NONE)
769769
self.px, self.py = libtcodpy.path_walk(self.path, True) # type: ignore
770770
libtcodpy.console_put_char(sample_console, self.px, self.py, "@", libtcodpy.BKGND_NONE)
771-
else:
772-
if not libtcodpy.dijkstra_is_empty(self.dijkstra):
773-
libtcodpy.console_put_char(sample_console, self.px, self.py, " ", libtcodpy.BKGND_NONE)
774-
self.px, self.py = libtcodpy.dijkstra_path_walk(self.dijkstra) # type: ignore
775-
libtcodpy.console_put_char(sample_console, self.px, self.py, "@", libtcodpy.BKGND_NONE)
776-
self.recalculate = True
771+
elif not libtcodpy.dijkstra_is_empty(self.dijkstra):
772+
libtcodpy.console_put_char(sample_console, self.px, self.py, " ", libtcodpy.BKGND_NONE)
773+
self.px, self.py = libtcodpy.dijkstra_path_walk(self.dijkstra) # type: ignore
774+
libtcodpy.console_put_char(sample_console, self.px, self.py, "@", libtcodpy.BKGND_NONE)
775+
self.recalculate = True
777776

778777
def ev_keydown(self, event: tcod.event.KeyDown) -> None:
779778
if event.sym == tcod.event.KeySym.i and self.dy > 0:

0 commit comments

Comments
 (0)