|
35 | 35 | from numpy.typing import ArrayLike, DTypeLike, NDArray |
36 | 36 |
|
37 | 37 |
|
38 | | -@ffi.def_extern() # type: ignore[misc] |
| 38 | +@ffi.def_extern() # type: ignore[untyped-decorator] |
39 | 39 | def _pycall_path_old(x1: int, y1: int, x2: int, y2: int, handle: Any) -> float: # noqa: ANN401 |
40 | 40 | """Libtcodpy style callback, needs to preserve the old userdata issue.""" |
41 | 41 | func, userdata = ffi.from_handle(handle) |
42 | 42 | return func(x1, y1, x2, y2, userdata) # type: ignore[no-any-return] |
43 | 43 |
|
44 | 44 |
|
45 | | -@ffi.def_extern() # type: ignore[misc] |
| 45 | +@ffi.def_extern() # type: ignore[untyped-decorator] |
46 | 46 | def _pycall_path_simple(x1: int, y1: int, x2: int, y2: int, handle: Any) -> float: # noqa: ANN401 |
47 | 47 | """Does less and should run faster, just calls the handle function.""" |
48 | 48 | return ffi.from_handle(handle)(x1, y1, x2, y2) # type: ignore[no-any-return] |
49 | 49 |
|
50 | 50 |
|
51 | | -@ffi.def_extern() # type: ignore[misc] |
| 51 | +@ffi.def_extern() # type: ignore[untyped-decorator] |
52 | 52 | def _pycall_path_swap_src_dest(x1: int, y1: int, x2: int, y2: int, handle: Any) -> float: # noqa: ANN401 |
53 | 53 | """A TDL function dest comes first to match up with a dest only call.""" |
54 | 54 | return ffi.from_handle(handle)(x2, y2, x1, y1) # type: ignore[no-any-return] |
55 | 55 |
|
56 | 56 |
|
57 | | -@ffi.def_extern() # type: ignore[misc] |
| 57 | +@ffi.def_extern() # type: ignore[untyped-decorator] |
58 | 58 | def _pycall_path_dest_only(_x1: int, _y1: int, x2: int, y2: int, handle: Any) -> float: # noqa: ANN401 |
59 | 59 | """A TDL function which samples the dest coordinate only.""" |
60 | 60 | return ffi.from_handle(handle)(x2, y2) # type: ignore[no-any-return] |
|
0 commit comments