Skip to content

Commit ddbdc1a

Browse files
committed
Update ignore tags on untyped decorators
Changed from `misc` to `untyped-decorator` in the latest Mypy
1 parent ba9ca96 commit ddbdc1a

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

tcod/cffi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def get_sdl_version() -> str:
6060
__sdl_version__ = get_sdl_version()
6161

6262

63-
@ffi.def_extern() # type: ignore[misc]
63+
@ffi.def_extern() # type: ignore[untyped-decorator]
6464
def _libtcod_log_watcher(message: Any, _userdata: None) -> None: # noqa: ANN401
6565
text = str(ffi.string(message.message), encoding="utf-8")
6666
source = str(ffi.string(message.source), encoding="utf-8")

tcod/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def __reduce__(self) -> NoReturn:
444444
raise pickle.PicklingError(msg)
445445

446446

447-
@ffi.def_extern() # type: ignore[misc]
447+
@ffi.def_extern() # type: ignore[untyped-decorator]
448448
def _pycall_cli_output(catch_reference: Any, output: Any) -> None: # noqa: ANN401
449449
"""Callback for the libtcod context CLI.
450450

tcod/event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ def get_mouse_state() -> MouseState:
15641564
return MouseState((xy[0], xy[1]), (int(tile[0]), int(tile[1])), buttons)
15651565

15661566

1567-
@ffi.def_extern() # type: ignore[misc]
1567+
@ffi.def_extern() # type: ignore[untyped-decorator]
15681568
def _sdl_event_watcher(userdata: Any, sdl_event: Any) -> int:
15691569
callback: Callable[[Event], None] = ffi.from_handle(userdata)
15701570
callback(_parse_event(sdl_event))

tcod/libtcodpy.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3607,27 +3607,27 @@ def parser_new_struct(parser: Any, name: str) -> Any:
36073607
_parser_listener: Any = None
36083608

36093609

3610-
@ffi.def_extern() # type: ignore[misc]
3610+
@ffi.def_extern() # type: ignore[untyped-decorator]
36113611
def _pycall_parser_new_struct(struct: Any, name: str) -> Any:
36123612
return _parser_listener.new_struct(struct, _unpack_char_p(name))
36133613

36143614

3615-
@ffi.def_extern() # type: ignore[misc]
3615+
@ffi.def_extern() # type: ignore[untyped-decorator]
36163616
def _pycall_parser_new_flag(name: str) -> Any:
36173617
return _parser_listener.new_flag(_unpack_char_p(name))
36183618

36193619

3620-
@ffi.def_extern() # type: ignore[misc]
3620+
@ffi.def_extern() # type: ignore[untyped-decorator]
36213621
def _pycall_parser_new_property(propname: Any, type: Any, value: Any) -> Any:
36223622
return _parser_listener.new_property(_unpack_char_p(propname), type, _unpack_union(type, value))
36233623

36243624

3625-
@ffi.def_extern() # type: ignore[misc]
3625+
@ffi.def_extern() # type: ignore[untyped-decorator]
36263626
def _pycall_parser_end_struct(struct: Any, name: Any) -> Any:
36273627
return _parser_listener.end_struct(struct, _unpack_char_p(name))
36283628

36293629

3630-
@ffi.def_extern() # type: ignore[misc]
3630+
@ffi.def_extern() # type: ignore[untyped-decorator]
36313631
def _pycall_parser_error(msg: Any) -> None:
36323632
_parser_listener.error(_unpack_char_p(msg))
36333633

tcod/path.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,26 @@
3535
from numpy.typing import ArrayLike, DTypeLike, NDArray
3636

3737

38-
@ffi.def_extern() # type: ignore[misc]
38+
@ffi.def_extern() # type: ignore[untyped-decorator]
3939
def _pycall_path_old(x1: int, y1: int, x2: int, y2: int, handle: Any) -> float: # noqa: ANN401
4040
"""Libtcodpy style callback, needs to preserve the old userdata issue."""
4141
func, userdata = ffi.from_handle(handle)
4242
return func(x1, y1, x2, y2, userdata) # type: ignore[no-any-return]
4343

4444

45-
@ffi.def_extern() # type: ignore[misc]
45+
@ffi.def_extern() # type: ignore[untyped-decorator]
4646
def _pycall_path_simple(x1: int, y1: int, x2: int, y2: int, handle: Any) -> float: # noqa: ANN401
4747
"""Does less and should run faster, just calls the handle function."""
4848
return ffi.from_handle(handle)(x1, y1, x2, y2) # type: ignore[no-any-return]
4949

5050

51-
@ffi.def_extern() # type: ignore[misc]
51+
@ffi.def_extern() # type: ignore[untyped-decorator]
5252
def _pycall_path_swap_src_dest(x1: int, y1: int, x2: int, y2: int, handle: Any) -> float: # noqa: ANN401
5353
"""A TDL function dest comes first to match up with a dest only call."""
5454
return ffi.from_handle(handle)(x2, y2, x1, y1) # type: ignore[no-any-return]
5555

5656

57-
@ffi.def_extern() # type: ignore[misc]
57+
@ffi.def_extern() # type: ignore[untyped-decorator]
5858
def _pycall_path_dest_only(_x1: int, _y1: int, x2: int, y2: int, handle: Any) -> float: # noqa: ANN401
5959
"""A TDL function which samples the dest coordinate only."""
6060
return ffi.from_handle(handle)(x2, y2) # type: ignore[no-any-return]

tcod/sdl/_internal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def __setitem__(self, key: tuple[str, type[T]], value: T, /) -> None:
149149
lib.SDL_SetPointerProperty(self.p, name, value._as_property_pointer())
150150

151151

152-
@ffi.def_extern() # type: ignore[misc]
152+
@ffi.def_extern() # type: ignore[untyped-decorator]
153153
def _sdl_log_output_function(_userdata: None, category: int, priority: int, message_p: Any) -> None: # noqa: ANN401
154154
"""Pass logs sent by SDL to Python's logging system."""
155155
message = str(ffi.string(message_p), encoding="utf-8")

tcod/sdl/audio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ def _on_stream(self, audio_stream: AudioStream, data: AudioStreamCallbackData) -
906906
audio_stream.queue_audio(stream)
907907

908908

909-
@ffi.def_extern() # type: ignore[misc]
909+
@ffi.def_extern() # type: ignore[untyped-decorator]
910910
def _sdl_audio_stream_callback(userdata: Any, stream_p: Any, additional_amount: int, total_amount: int, /) -> None: # noqa: ANN401
911911
"""Handle audio device callbacks."""
912912
stream = AudioStream(stream_p)

0 commit comments

Comments
 (0)