1414
1515import numpy as np
1616from numpy .typing import ArrayLike , NDArray
17- from typing_extensions import Literal
17+ from typing_extensions import Literal , deprecated
1818
1919import tcod ._internal
2020import tcod .constants
21- from tcod ._internal import _check , _path_encode , deprecate
21+ from tcod ._internal import _check , _path_encode
2222from tcod .cffi import ffi , lib
2323
2424
@@ -248,7 +248,7 @@ def ch(self) -> NDArray[np.intc]:
248248 return self ._tiles ["ch" ].T if self ._order == "F" else self ._tiles ["ch" ]
249249
250250 @property
251- @deprecate ("This attribute has been renamed to `rgba`." , category = FutureWarning )
251+ @deprecated ("This attribute has been renamed to `rgba`." , category = FutureWarning )
252252 def tiles (self ) -> NDArray [Any ]:
253253 """An array of this consoles raw tile data.
254254
@@ -264,7 +264,7 @@ def tiles(self) -> NDArray[Any]:
264264 return self .rgba
265265
266266 @property
267- @deprecate ("This attribute has been renamed to `rgba`." , category = FutureWarning )
267+ @deprecated ("This attribute has been renamed to `rgba`." , category = FutureWarning )
268268 def buffer (self ) -> NDArray [Any ]:
269269 """An array of this consoles raw tile data.
270270
@@ -276,7 +276,7 @@ def buffer(self) -> NDArray[Any]:
276276 return self .rgba
277277
278278 @property
279- @deprecate ("This attribute has been renamed to `rgb`." , category = FutureWarning )
279+ @deprecated ("This attribute has been renamed to `rgb`." , category = FutureWarning )
280280 def tiles_rgb (self ) -> NDArray [Any ]:
281281 """An array of this consoles data without the alpha channel.
282282
@@ -288,7 +288,7 @@ def tiles_rgb(self) -> NDArray[Any]:
288288 return self .rgb
289289
290290 @property
291- @deprecate ("This attribute has been renamed to `rgb`." , category = FutureWarning )
291+ @deprecated ("This attribute has been renamed to `rgb`." , category = FutureWarning )
292292 def tiles2 (self ) -> NDArray [Any ]:
293293 """This name is deprecated in favour of :any:`rgb`.
294294
@@ -352,7 +352,7 @@ def default_bg(self) -> tuple[int, int, int]:
352352 return color .r , color .g , color .b
353353
354354 @default_bg .setter
355- @deprecate ("Console defaults have been deprecated." , category = FutureWarning )
355+ @deprecated ("Console defaults have been deprecated." , category = FutureWarning )
356356 def default_bg (self , color : tuple [int , int , int ]) -> None :
357357 self ._console_data .back = color
358358
@@ -363,7 +363,7 @@ def default_fg(self) -> tuple[int, int, int]:
363363 return color .r , color .g , color .b
364364
365365 @default_fg .setter
366- @deprecate ("Console defaults have been deprecated." , category = FutureWarning )
366+ @deprecated ("Console defaults have been deprecated." , category = FutureWarning )
367367 def default_fg (self , color : tuple [int , int , int ]) -> None :
368368 self ._console_data .fore = color
369369
@@ -373,7 +373,7 @@ def default_bg_blend(self) -> int:
373373 return self ._console_data .bkgnd_flag # type: ignore
374374
375375 @default_bg_blend .setter
376- @deprecate ("Console defaults have been deprecated." , category = FutureWarning )
376+ @deprecated ("Console defaults have been deprecated." , category = FutureWarning )
377377 def default_bg_blend (self , value : int ) -> None :
378378 self ._console_data .bkgnd_flag = value
379379
@@ -383,7 +383,7 @@ def default_alignment(self) -> int:
383383 return self ._console_data .alignment # type: ignore
384384
385385 @default_alignment .setter
386- @deprecate ("Console defaults have been deprecated." , category = FutureWarning )
386+ @deprecated ("Console defaults have been deprecated." , category = FutureWarning )
387387 def default_alignment (self , value : int ) -> None :
388388 self ._console_data .alignment = value
389389
@@ -830,7 +830,7 @@ def blit( # noqa: PLR0913
830830 bg_alpha ,
831831 )
832832
833- @deprecate ("Pass the key color to Console.blit instead of calling this function." )
833+ @deprecated ("Pass the key color to Console.blit instead of calling this function." )
834834 def set_key_color (self , color : tuple [int , int , int ] | None ) -> None :
835835 """Set a consoles blit transparent color.
836836
@@ -1234,7 +1234,7 @@ def get_height_rect(width: int, string: str) -> int:
12341234 return int (lib .TCOD_console_get_height_rect_wn (width , len (string_ ), string_ ))
12351235
12361236
1237- @deprecate ("This function does not support contexts." , category = FutureWarning )
1237+ @deprecated ("This function does not support contexts." , category = FutureWarning )
12381238def recommended_size () -> tuple [int , int ]:
12391239 """Return the recommended size of a console for the current active window.
12401240
0 commit comments