Skip to content

Commit ecd1f98

Browse files
committed
Update linters
Cleanup minor Mypy and Ruff warnings
1 parent ef3698c commit ecd1f98

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ci:
44
autoupdate_schedule: quarterly
55
repos:
66
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: v5.0.0
7+
rev: v6.0.0
88
hooks:
99
- id: trailing-whitespace
1010
- id: end-of-file-fixer
@@ -17,7 +17,7 @@ repos:
1717
- id: fix-byte-order-marker
1818
- id: detect-private-key
1919
- repo: https://github.com/astral-sh/ruff-pre-commit
20-
rev: v0.12.4
20+
rev: v0.14.6
2121
hooks:
2222
- id: ruff-check
2323
args: [--fix, --exit-non-zero-on-fix]

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ warn_unused_ignores = true
6565
warn_return_any = true
6666
no_implicit_reexport = true
6767
strict_equality = true
68+
strict_bytes = true
69+
extra_checks = true
6870

6971
[tool.pyright]
7072
reportInconsistentOverload = false

tcod/ecs/entity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ def clear(self) -> None:
925925

926926

927927
@attrs.define(eq=False, frozen=True, weakref_slot=False)
928-
class EntityComponentRelationMapping(Generic[T], MutableMapping[Entity, T]):
928+
class EntityComponentRelationMapping(MutableMapping[Entity, T], Generic[T]):
929929
"""An entity-component mapping to access the relation target component objects.
930930
931931
See :any:`Entity.relation_components`.

tests/test_benchmarks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_component_missing(benchmark: Any) -> None:
1717
def test_component_assign(benchmark: Any) -> None:
1818
entity = tcod.ecs.Registry().new_entity()
1919

20-
@benchmark # type: ignore[misc]
20+
@benchmark # type: ignore[untyped-decorator]
2121
def _() -> None:
2222
entity.components[str] = "value"
2323

0 commit comments

Comments
 (0)