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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:
autoupdate_schedule: quarterly
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -17,7 +17,7 @@ repos:
- id: fix-byte-order-marker
- id: detect-private-key
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.6
rev: v0.8.6
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 1 addition & 1 deletion tcod/ecs/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
>>> other_entity = registry["other"]
""" # Changes here should be reflected in conftest.py

__slots__ = ("registry", "uid", "__weakref__")
__slots__ = ("__weakref__", "registry", "uid")

registry: Final[Registry] # type:ignore[misc] # https://github.com/python/mypy/issues/5774
"""The :any:`Registry` this entity belongs to."""
Expand Down Expand Up @@ -552,7 +552,7 @@
except KeyError:
return default # type: ignore[return-value] # https://github.com/python/mypy/issues/3737

def setdefault(self, __key: ComponentKey[T], __default: T) -> T: # type: ignore[override]

Check failure on line 555 in tcod/ecs/entity.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (PYI063)

tcod/ecs/entity.py:555:26: PYI063 Use PEP 570 syntax for positional-only parameters
"""Assign a default value if a component is missing, then returns the current value."""
try:
return self[__key]
Expand Down Expand Up @@ -1040,7 +1040,7 @@
"""Access relations for this component key as a `{target: component}` dict-like object."""
return EntityComponentRelationMapping(self.entity, key, self.traverse)

def __setitem__(self, __key: ComponentKey[T], __values: Mapping[Entity, object]) -> None:

Check failure on line 1043 in tcod/ecs/entity.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (PYI063)

tcod/ecs/entity.py:1043:27: PYI063 Use PEP 570 syntax for positional-only parameters
"""Redefine the component relations for this entity.

..versionadded:: 4.2.0
Expand Down
Loading