Skip to content

Commit

Permalink
Merge pull request #146 from libtcod/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
HexDecimal committed Feb 5, 2024
2 parents cba9863 + 5726f0d commit 946dad3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
- id: fix-byte-order-marker
- id: detect-private-key
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
rev: v0.2.0
hooks:
- id: ruff
args: [--fix-only, --exit-non-zero-on-fix]
Expand Down
2 changes: 1 addition & 1 deletion build_libtcod.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 946dad3

Please sign in to comment.