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 #155

Closed
wants to merge 2 commits into from
Closed
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
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ repos:
hooks:
- id: pylint
- repo: "https://github.com/bwhmather/ssort"
rev: v0.12.0
rev: 0.12.4
hooks:
- id: ssort
- repo: "https://github.com/charliermarsh/ruff-pre-commit"
rev: v0.1.13
rev: v0.2.0
hooks:
- id: ruff
args: ["--fix", "--exit-non-zero-on-fix"]
Expand All @@ -33,6 +33,6 @@ repos:
args: ["--autofix"]
- id: trailing-whitespace
- repo: "https://github.com/psf/black"
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black
2 changes: 1 addition & 1 deletion src/hades/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"ENEMY_GENERATION_DISTANCE",
"ENEMY_RETRY_COUNT",
"GAME_LOGGER",
"GameObjectType",
"INDICATOR_BAR_BORDER_SIZE",
"INDICATOR_BAR_DISTANCE",
"INDICATOR_BAR_HEIGHT",
Expand All @@ -32,6 +31,7 @@
"MAX_VELOCITY",
"TOTAL_ENEMY_COUNT",
"USABLE_TYPES",
"GameObjectType",
)


Expand Down
2 changes: 1 addition & 1 deletion src/hades/constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from hades_extensions.game_objects import ComponentBase

__all__ = ("ENEMY", "FLOOR", "GameObjectConstructor", "PLAYER", "POTION", "WALL")
__all__ = ("ENEMY", "FLOOR", "PLAYER", "POTION", "WALL", "GameObjectConstructor")


class GameObjectConstructor(NamedTuple):
Expand Down
6 changes: 3 additions & 3 deletions src/hades/indicator_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ class IndicatorBar:
"""

__slots__ = (
"target_sprite",
"target_component",
"background_box",
"actual_bar",
"background_box",
"offset",
"target_component",
"target_sprite",
)

def __init__(
Expand Down
9 changes: 3 additions & 6 deletions tests/test_sprite.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ def test_hades_sprite_init() -> None:
sprite = HadesSprite((0, GameObjectType.PLAYER), (10, 20), ["floor.png"])
assert sprite.position == (672.0, 1312.0)
assert (
repr(sprite)
== "<HadesSprite (Game object ID=0) (Current texture=<Texture"
repr(sprite) == "<HadesSprite (Game object ID=0) (Current texture=<Texture"
" cache_name=b3d8c789f0ab79a64f6ee6c8eac8fc329b53a3a56ed6c0ee262522cefef5dcf4|("
"0, 1, 2, 3)|SimpleHitBoxAlgorithm|>)>"
)
Expand Down Expand Up @@ -104,8 +103,7 @@ def test_animated_sprite_init() -> None:
assert len(sprite.sprite_textures) == 1
assert len(sprite.sprite_textures[0]) == 2
assert (
repr(sprite)
== "<AnimatedSprite (Game object ID=0) (Current texture=<Texture"
repr(sprite) == "<AnimatedSprite (Game object ID=0) (Current texture=<Texture"
" cache_name=b3d8c789f0ab79a64f6ee6c8eac8fc329b53a3a56ed6c0ee262522cefef5dcf4|("
"0, 1, 2, 3)|SimpleHitBoxAlgorithm|>)>"
)
Expand All @@ -122,8 +120,7 @@ def test_animated_sprite_multiple_textures() -> None:
assert len(sprite.sprite_textures) == 2
assert len(sprite.sprite_textures[0]) == 2
assert (
repr(sprite)
== "<AnimatedSprite (Game object ID=1) (Current texture=<Texture"
repr(sprite) == "<AnimatedSprite (Game object ID=1) (Current texture=<Texture"
" cache_name=6c519a52622fb21c14df6fddfe3541a38344e258ade26b2f02505bb216f73b32|("
"0, 1, 2, 3)|SimpleHitBoxAlgorithm|>)>"
)
Loading