Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 5, 2024
1 parent 60ea79c commit 5726f0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build_libtcod.py
Expand Up @@ -15,7 +15,7 @@

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

import build_sdl # noqa: E402
import build_sdl

Py_LIMITED_API = 0x03060000

Expand Down
11 changes: 5 additions & 6 deletions examples/samples_tcod.py
Expand Up @@ -768,12 +768,11 @@ def on_draw(self) -> None:
libtcodpy.console_put_char(sample_console, self.px, self.py, " ", libtcodpy.BKGND_NONE)
self.px, self.py = libtcodpy.path_walk(self.path, True) # type: ignore
libtcodpy.console_put_char(sample_console, self.px, self.py, "@", libtcodpy.BKGND_NONE)
else:
if not libtcodpy.dijkstra_is_empty(self.dijkstra):
libtcodpy.console_put_char(sample_console, self.px, self.py, " ", libtcodpy.BKGND_NONE)
self.px, self.py = libtcodpy.dijkstra_path_walk(self.dijkstra) # type: ignore
libtcodpy.console_put_char(sample_console, self.px, self.py, "@", libtcodpy.BKGND_NONE)
self.recalculate = True
elif not libtcodpy.dijkstra_is_empty(self.dijkstra):
libtcodpy.console_put_char(sample_console, self.px, self.py, " ", libtcodpy.BKGND_NONE)
self.px, self.py = libtcodpy.dijkstra_path_walk(self.dijkstra) # type: ignore
libtcodpy.console_put_char(sample_console, self.px, self.py, "@", libtcodpy.BKGND_NONE)
self.recalculate = True

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

0 comments on commit 5726f0d

Please sign in to comment.