Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #146

Merged
merged 2 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading