Skip to content

Commit 39d28d4

Browse files
committed
Enable more strict Mypy settings
1 parent 61d4399 commit 39d28d4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ warn_unused_ignores = true
117117
warn_return_any = true
118118
implicit_reexport = false
119119
strict_equality = true
120+
strict_bytes = true
121+
extra_checks = true
120122
exclude = [
121123
"build/",
122124
"venv/",

tcod/path.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def __init__(self, userdata: object, shape: tuple[int, int]) -> None:
8585

8686
def get_tcod_path_ffi(self) -> tuple[Any, Any, tuple[int, int]]:
8787
"""Return (C callback, userdata handle, shape)."""
88-
return self._CALLBACK_P, ffi.new_handle(self._userdata), self.shape # type: ignore[misc] # https://github.com/python/mypy/issues/19146
88+
return self._CALLBACK_P, ffi.new_handle(self._userdata), self.shape
8989

9090
def __repr__(self) -> str:
9191
return f"{self.__class__.__name__}({self._userdata!r}, shape={self.shape!r})"
@@ -168,7 +168,7 @@ def __init__(self, cost: tcod.map.Map | ArrayLike | _EdgeCostFunc, diagonal: flo
168168
if isinstance(self.cost, tcod.map.Map):
169169
self.shape = self.cost.width, self.cost.height
170170
self._path_c = ffi.gc(
171-
self._path_new_using_map(self.cost.map_c, diagonal), # type: ignore[call-arg] # https://github.com/python/mypy/issues/19146
171+
self._path_new_using_map(self.cost.map_c, diagonal),
172172
self._path_delete,
173173
)
174174
return
@@ -185,7 +185,7 @@ def __init__(self, cost: tcod.map.Map | ArrayLike | _EdgeCostFunc, diagonal: flo
185185
self.shape,
186186
) = self.cost.get_tcod_path_ffi()
187187
self._path_c = ffi.gc(
188-
self._path_new_using_function( # type: ignore[misc, call-arg] # https://github.com/python/mypy/issues/19146
188+
self._path_new_using_function(
189189
self.cost.shape[0],
190190
self.cost.shape[1],
191191
self._callback,

0 commit comments

Comments
 (0)