tcod 16.2.3__tar.gz → 17.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. {tcod-16.2.3 → tcod-17.0.0}/CHANGELOG.md +15 -0
  2. {tcod-16.2.3 → tcod-17.0.0}/PKG-INFO +5 -3
  3. {tcod-16.2.3 → tcod-17.0.0}/build_libtcod.py +4 -3
  4. {tcod-16.2.3 → tcod-17.0.0}/build_sdl.py +4 -1
  5. {tcod-16.2.3 → tcod-17.0.0}/pyproject.toml +13 -15
  6. {tcod-16.2.3 → tcod-17.0.0}/tcod/_internal.py +13 -17
  7. {tcod-16.2.3 → tcod-17.0.0}/tcod/bsp.py +5 -4
  8. {tcod-16.2.3 → tcod-17.0.0}/tcod/cffi.py +2 -2
  9. {tcod-16.2.3 → tcod-17.0.0}/tcod/color.py +7 -7
  10. {tcod-16.2.3 → tcod-17.0.0}/tcod/console.py +62 -28
  11. {tcod-16.2.3 → tcod-17.0.0}/tcod/constants.py +1 -1
  12. {tcod-16.2.3 → tcod-17.0.0}/tcod/context.py +21 -20
  13. {tcod-16.2.3 → tcod-17.0.0}/tcod/event.py +55 -66
  14. {tcod-16.2.3 → tcod-17.0.0}/tcod/event_constants.py +1 -18
  15. {tcod-16.2.3 → tcod-17.0.0}/tcod/image.py +3 -3
  16. {tcod-16.2.3 → tcod-17.0.0}/tcod/libtcodpy.py +81 -86
  17. {tcod-16.2.3 → tcod-17.0.0}/tcod/map.py +5 -3
  18. {tcod-16.2.3 → tcod-17.0.0}/tcod/noise.py +2 -1
  19. {tcod-16.2.3 → tcod-17.0.0}/tcod/path.py +8 -6
  20. {tcod-16.2.3 → tcod-17.0.0}/tcod/random.py +4 -3
  21. {tcod-16.2.3 → tcod-17.0.0}/tcod/render.py +2 -0
  22. {tcod-16.2.3 → tcod-17.0.0}/tcod/sdl/render.py +31 -33
  23. {tcod-16.2.3 → tcod-17.0.0}/tcod/tileset.py +31 -7
  24. {tcod-16.2.3 → tcod-17.0.0}/tcod/version.py +9 -4
  25. {tcod-16.2.3 → tcod-17.0.0}/tcod.egg-info/PKG-INFO +5 -3
  26. {tcod-16.2.3 → tcod-17.0.0}/tcod.egg-info/requires.txt +1 -1
  27. {tcod-16.2.3 → tcod-17.0.0}/CONTRIBUTING.md +0 -0
  28. {tcod-16.2.3 → tcod-17.0.0}/LICENSE.txt +0 -0
  29. {tcod-16.2.3 → tcod-17.0.0}/MANIFEST.in +0 -0
  30. {tcod-16.2.3 → tcod-17.0.0}/README.rst +0 -0
  31. {tcod-16.2.3 → tcod-17.0.0}/libtcod/CHANGELOG.md +0 -0
  32. {tcod-16.2.3 → tcod-17.0.0}/libtcod/CMakeLists.txt +0 -0
  33. {tcod-16.2.3 → tcod-17.0.0}/libtcod/CONTRIBUTING.md +0 -0
  34. {tcod-16.2.3 → tcod-17.0.0}/libtcod/LIBTCOD-CREDITS.txt +0 -0
  35. {tcod-16.2.3 → tcod-17.0.0}/libtcod/LICENSE.txt +0 -0
  36. {tcod-16.2.3 → tcod-17.0.0}/libtcod/README.md +0 -0
  37. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/bresenham.h +0 -0
  38. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/bresenham_c.c +0 -0
  39. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/bsp.h +0 -0
  40. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/bsp_c.c +0 -0
  41. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/color.c +0 -0
  42. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/color.h +0 -0
  43. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/config.h +0 -0
  44. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/console.c +0 -0
  45. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/console.h +0 -0
  46. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/console_drawing.c +0 -0
  47. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/console_drawing.h +0 -0
  48. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/console_etc.c +0 -0
  49. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/console_etc.h +0 -0
  50. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/console_init.c +0 -0
  51. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/console_init.h +0 -0
  52. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/console_printing.c +0 -0
  53. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/console_printing.h +0 -0
  54. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/console_rexpaint.c +0 -0
  55. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/console_rexpaint.h +0 -0
  56. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/console_types.h +0 -0
  57. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/context.c +0 -0
  58. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/context.h +0 -0
  59. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/context_init.c +0 -0
  60. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/context_init.h +0 -0
  61. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/context_viewport.c +0 -0
  62. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/context_viewport.h +0 -0
  63. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/error.c +0 -0
  64. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/error.h +0 -0
  65. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/fov.h +0 -0
  66. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/fov_c.c +0 -0
  67. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/fov_circular_raycasting.c +0 -0
  68. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/fov_diamond_raycasting.c +0 -0
  69. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/fov_permissive2.c +0 -0
  70. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/fov_recursive_shadowcasting.c +0 -0
  71. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/fov_restrictive.c +0 -0
  72. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/fov_symmetric_shadowcast.c +0 -0
  73. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/fov_types.h +0 -0
  74. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/globals.c +0 -0
  75. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/globals.h +0 -0
  76. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/heapq.c +0 -0
  77. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/heapq.h +0 -0
  78. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/heightmap.h +0 -0
  79. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/heightmap_c.c +0 -0
  80. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/image.h +0 -0
  81. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/image_c.c +0 -0
  82. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/lex.h +0 -0
  83. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/lex_c.c +0 -0
  84. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/libtcod.h +0 -0
  85. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/libtcod_int.h +0 -0
  86. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/list.h +0 -0
  87. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/list_c.c +0 -0
  88. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/logging.c +0 -0
  89. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/logging.h +0 -0
  90. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/mersenne.h +0 -0
  91. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/mersenne_c.c +0 -0
  92. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/mersenne_types.h +0 -0
  93. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/mouse.h +0 -0
  94. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/mouse_types.h +0 -0
  95. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/namegen.h +0 -0
  96. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/namegen_c.c +0 -0
  97. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/noise.h +0 -0
  98. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/noise_c.c +0 -0
  99. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/noise_defaults.h +0 -0
  100. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/parser.h +0 -0
  101. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/parser_c.c +0 -0
  102. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/path.h +0 -0
  103. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/path_c.c +0 -0
  104. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/pathfinder.c +0 -0
  105. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/pathfinder.h +0 -0
  106. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/pathfinder_frontier.c +0 -0
  107. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/pathfinder_frontier.h +0 -0
  108. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/portability.h +0 -0
  109. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/random.c +0 -0
  110. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/random.h +0 -0
  111. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/renderer_sdl2.c +0 -0
  112. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/renderer_sdl2.h +0 -0
  113. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/renderer_xterm.c +0 -0
  114. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/renderer_xterm.h +0 -0
  115. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/sdl2/console_grid.glslf +0 -0
  116. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/sdl2/console_grid.glslv +0 -0
  117. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/sdl2/event.h +0 -0
  118. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/sys.h +0 -0
  119. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/sys_c.c +0 -0
  120. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/sys_sdl_c.c +0 -0
  121. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/sys_sdl_img_bmp.c +0 -0
  122. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/sys_sdl_img_png.c +0 -0
  123. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/tileset.c +0 -0
  124. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/tileset.h +0 -0
  125. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/tileset_bdf.c +0 -0
  126. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/tileset_bdf.h +0 -0
  127. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/tileset_fallback.c +0 -0
  128. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/tileset_fallback.h +0 -0
  129. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/tileset_render.c +0 -0
  130. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/tileset_render.h +0 -0
  131. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/tileset_truetype.c +0 -0
  132. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/tileset_truetype.h +0 -0
  133. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/timer.h +0 -0
  134. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/tree.h +0 -0
  135. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/tree_c.c +0 -0
  136. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/txtfield.h +0 -0
  137. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/txtfield_c.c +0 -0
  138. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/utility.h +0 -0
  139. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/version.h +0 -0
  140. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/wrappers.c +0 -0
  141. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/wrappers.h +0 -0
  142. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/zip.h +0 -0
  143. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod/zip_c.c +0 -0
  144. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod.h +0 -0
  145. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/libtcod_c.c +0 -0
  146. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/khrplatform.h +0 -0
  147. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/lodepng.c +0 -0
  148. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/lodepng.h +0 -0
  149. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/stb.c +0 -0
  150. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/stb_ds.h +0 -0
  151. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/stb_truetype.h +0 -0
  152. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/utf8proc/utf8proc.c +0 -0
  153. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/utf8proc/utf8proc.h +0 -0
  154. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/utf8proc/utf8proc_data.c +0 -0
  155. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/adler32.c +0 -0
  156. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/compress.c +0 -0
  157. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/crc32.c +0 -0
  158. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/crc32.h +0 -0
  159. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/deflate.c +0 -0
  160. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/deflate.h +0 -0
  161. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/gzclose.c +0 -0
  162. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/gzguts.h +0 -0
  163. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/gzlib.c +0 -0
  164. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/gzread.c +0 -0
  165. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/gzwrite.c +0 -0
  166. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/infback.c +0 -0
  167. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/inffast.c +0 -0
  168. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/inffast.h +0 -0
  169. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/inffixed.h +0 -0
  170. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/inflate.c +0 -0
  171. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/inflate.h +0 -0
  172. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/inftrees.c +0 -0
  173. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/inftrees.h +0 -0
  174. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/trees.c +0 -0
  175. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/trees.h +0 -0
  176. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/uncompr.c +0 -0
  177. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/zconf.h +0 -0
  178. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/zlib.h +0 -0
  179. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/zutil.c +0 -0
  180. {tcod-16.2.3 → tcod-17.0.0}/libtcod/src/vendor/zlib/zutil.h +0 -0
  181. {tcod-16.2.3 → tcod-17.0.0}/libtcodpy.py +0 -0
  182. {tcod-16.2.3 → tcod-17.0.0}/requirements.txt +0 -0
  183. {tcod-16.2.3 → tcod-17.0.0}/setup.cfg +0 -0
  184. {tcod-16.2.3 → tcod-17.0.0}/setup.py +0 -0
  185. {tcod-16.2.3 → tcod-17.0.0}/tcod/__init__.py +5 -5
  186. {tcod-16.2.3 → tcod-17.0.0}/tcod/__pyinstaller/__init__.py +0 -0
  187. {tcod-16.2.3 → tcod-17.0.0}/tcod/__pyinstaller/hook-tcod.py +0 -0
  188. {tcod-16.2.3 → tcod-17.0.0}/tcod/cdef.h +0 -0
  189. {tcod-16.2.3 → tcod-17.0.0}/tcod/cffi.h +0 -0
  190. {tcod-16.2.3 → tcod-17.0.0}/tcod/los.py +0 -0
  191. {tcod-16.2.3 → tcod-17.0.0}/tcod/noise.c +0 -0
  192. {tcod-16.2.3 → tcod-17.0.0}/tcod/noise.h +0 -0
  193. {tcod-16.2.3 → tcod-17.0.0}/tcod/path.c +0 -0
  194. {tcod-16.2.3 → tcod-17.0.0}/tcod/path.h +0 -0
  195. {tcod-16.2.3 → tcod-17.0.0}/tcod/py.typed +0 -0
  196. {tcod-16.2.3 → tcod-17.0.0}/tcod/random.h +0 -0
  197. {tcod-16.2.3 → tcod-17.0.0}/tcod/sdl/__init__.py +0 -0
  198. {tcod-16.2.3 → tcod-17.0.0}/tcod/sdl/_internal.py +0 -0
  199. {tcod-16.2.3 → tcod-17.0.0}/tcod/sdl/audio.py +0 -0
  200. {tcod-16.2.3 → tcod-17.0.0}/tcod/sdl/joystick.py +0 -0
  201. {tcod-16.2.3 → tcod-17.0.0}/tcod/sdl/mouse.py +0 -0
  202. {tcod-16.2.3 → tcod-17.0.0}/tcod/sdl/sys.py +0 -0
  203. {tcod-16.2.3 → tcod-17.0.0}/tcod/sdl/video.py +2 -2
  204. {tcod-16.2.3 → tcod-17.0.0}/tcod/tcod.c +0 -0
  205. {tcod-16.2.3 → tcod-17.0.0}/tcod/tcod.h +0 -0
  206. {tcod-16.2.3 → tcod-17.0.0}/tcod/tcod.py +1 -1
  207. {tcod-16.2.3 → tcod-17.0.0}/tcod/tdl.c +0 -0
  208. {tcod-16.2.3 → tcod-17.0.0}/tcod/tdl.h +0 -0
  209. {tcod-16.2.3 → tcod-17.0.0}/tcod.egg-info/SOURCES.txt +0 -0
  210. {tcod-16.2.3 → tcod-17.0.0}/tcod.egg-info/dependency_links.txt +0 -0
  211. {tcod-16.2.3 → tcod-17.0.0}/tcod.egg-info/entry_points.txt +0 -0
  212. {tcod-16.2.3 → tcod-17.0.0}/tcod.egg-info/top_level.txt +0 -0
  213. {tcod-16.2.3 → tcod-17.0.0}/tox.ini +0 -0
@@ -6,6 +6,21 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [17.0.0] - 2025-03-28
10
+
11
+ ### Changed
12
+
13
+ - `EventDispatch`'s on event methods are now defined as positional parameters, so renaming the `event` parameter is now valid in subclasses.
14
+
15
+ ### Deprecated
16
+
17
+ - Keyboard bitmask modifiers `tcod.event.KMOD_*` have been replaced by `tcod.event.Modifier`.
18
+
19
+ ### Fixed
20
+
21
+ - Suppressed internal `mouse.tile_motion` deprecation warning.
22
+ - Fixed SDL renderer primitive drawing methods. #159
23
+
9
24
  ## [16.2.3] - 2024-07-16
10
25
 
11
26
  ### Fixed
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: tcod
3
- Version: 16.2.3
3
+ Version: 17.0.0
4
4
  Summary: The official Python port of libtcod.
5
5
  Author-email: Kyle Benesch <4b796c65+tcod@gmail.com>
6
6
  License: Simplified BSD License
@@ -41,7 +41,9 @@ Description-Content-Type: text/x-rst
41
41
  License-File: LICENSE.txt
42
42
  Requires-Dist: cffi>=1.15
43
43
  Requires-Dist: numpy>=1.21.4; implementation_name != "pypy"
44
- Requires-Dist: typing_extensions
44
+ Requires-Dist: typing_extensions>=4.12.2
45
+ Dynamic: license-file
46
+ Dynamic: platform
45
47
 
46
48
  .. contents::
47
49
  :backlinks: top
@@ -233,6 +233,7 @@ CONSTANT_MODULE_HEADER = '''"""Constants from the libtcod C API.
233
233
 
234
234
  This module is auto-generated by `build_libtcod.py`.
235
235
  """
236
+
236
237
  from tcod.color import Color
237
238
 
238
239
  '''
@@ -366,7 +367,7 @@ def write_library_constants() -> None:
366
367
  f.write(f"{name[5:]} = {color!r}\n")
367
368
 
368
369
  all_names_merged = ",\n ".join(f'"{name}"' for name in all_names)
369
- f.write(f"\n__all__ = [\n {all_names_merged},\n]\n")
370
+ f.write(f"\n__all__ = [ # noqa: RUF022\n {all_names_merged},\n]\n")
370
371
  update_module_all(Path("tcod/libtcodpy.py"), all_names_merged)
371
372
 
372
373
  with Path("tcod/event_constants.py").open("w", encoding="utf-8") as f:
@@ -379,12 +380,12 @@ def write_library_constants() -> None:
379
380
  f.write(f"""{parse_sdl_attrs("SDLK", None)[0]}\n""")
380
381
 
381
382
  f.write("\n# --- SDL keyboard modifiers ---\n")
382
- f.write("{}\n_REVERSE_MOD_TABLE = {}\n".format(*parse_sdl_attrs("KMOD", all_names)))
383
+ f.write("{}\n_REVERSE_MOD_TABLE = {}\n".format(*parse_sdl_attrs("KMOD", None)))
383
384
 
384
385
  f.write("\n# --- SDL wheel ---\n")
385
386
  f.write("{}\n_REVERSE_WHEEL_TABLE = {}\n".format(*parse_sdl_attrs("SDL_MOUSEWHEEL", all_names)))
386
387
  all_names_merged = ",\n ".join(f'"{name}"' for name in all_names)
387
- f.write(f"\n__all__ = [\n {all_names_merged},\n]\n")
388
+ f.write(f"\n__all__ = [ # noqa: RUF022\n {all_names_merged},\n]\n")
388
389
 
389
390
  event_py = Path("tcod/event.py").read_text(encoding="utf-8")
390
391
 
@@ -33,7 +33,7 @@ SDL2_BUNDLE_VERSION = os.environ.get("SDL_VERSION", "2.28.1")
33
33
  # Used to remove excessive newlines in debug outputs.
34
34
  RE_NEWLINES = re.compile(r"\n\n+")
35
35
  # Functions using va_list need to be culled.
36
- RE_VAFUNC = re.compile(r"^.*?\([^()]*va_list[^()]*\);$", re.MULTILINE)
36
+ RE_VAFUNC = re.compile(r"^.*?\([^()]*va_list[^()]*\)\s*;\s*$", re.MULTILINE)
37
37
  # Static inline functions need to be culled.
38
38
  RE_INLINE = re.compile(r"^static inline.*?^}$", re.MULTILINE | re.DOTALL)
39
39
  # Most SDL_PIXELFORMAT names need their values scrubbed.
@@ -60,6 +60,9 @@ IGNORE_DEFINES = frozenset(
60
60
  "SDL_INLINE",
61
61
  "SDL_FORCE_INLINE",
62
62
  "SDL_FALLTHROUGH",
63
+ "SDL_HAS_FALLTHROUGH",
64
+ "SDL_NO_THREAD_SAFETY_ANALYSIS",
65
+ "SDL_SCOPED_CAPABILITY",
63
66
  # Might show up in parsing and not in source.
64
67
  "SDL_ANDROID_EXTERNAL_STORAGE_READ",
65
68
  "SDL_ANDROID_EXTERNAL_STORAGE_WRITE",
@@ -23,7 +23,7 @@ license = { text = "Simplified BSD License" }
23
23
  dependencies = [
24
24
  "cffi>=1.15",
25
25
  'numpy>=1.21.4; implementation_name != "pypy"',
26
- "typing_extensions",
26
+ "typing_extensions>=4.12.2",
27
27
  ]
28
28
  keywords = [
29
29
  "roguelike",
@@ -178,20 +178,18 @@ select = [
178
178
  "D", # pydocstyle
179
179
  ]
180
180
  ignore = [
181
- "E501", # line-too-long
182
- "S101", # assert
183
- "S301", # suspicious-pickle-usage
184
- "S311", # suspicious-non-cryptographic-random-usage
185
- "ANN101", # missing-type-self
186
- "ANN102", # missing-type-cls
187
- "D203", # one-blank-line-before-class
188
- "D204", # one-blank-line-after-class
189
- "D213", # multi-line-summary-second-line
190
- "D407", # dashed-underline-after-section
191
- "D408", # section-underline-after-name
192
- "D409", # section-underline-matches-section-length
193
- "D206", # indent-with-spaces
194
- "W191", # tab-indentation
181
+ "E501", # line-too-long
182
+ "S101", # assert
183
+ "S301", # suspicious-pickle-usage
184
+ "S311", # suspicious-non-cryptographic-random-usage
185
+ "D203", # one-blank-line-before-class
186
+ "D204", # one-blank-line-after-class
187
+ "D213", # multi-line-summary-second-line
188
+ "D407", # dashed-underline-after-section
189
+ "D408", # section-underline-after-name
190
+ "D409", # section-underline-matches-section-length
191
+ "D206", # indent-with-spaces
192
+ "W191", # tab-indentation
195
193
  ]
196
194
 
197
195
  [tool.ruff.lint.pydocstyle] # https://docs.astral.sh/ruff/settings/#lintpydocstyle
@@ -2,17 +2,16 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- import functools
6
5
  import locale
7
6
  import sys
8
7
  import warnings
9
8
  from pathlib import Path
10
9
  from types import TracebackType
11
- from typing import TYPE_CHECKING, Any, AnyStr, Callable, NoReturn, SupportsInt, TypeVar, cast
10
+ from typing import TYPE_CHECKING, Any, AnyStr, Callable, NoReturn, SupportsInt, TypeVar
12
11
 
13
12
  import numpy as np
14
13
  from numpy.typing import ArrayLike, NDArray
15
- from typing_extensions import Literal
14
+ from typing_extensions import Literal, LiteralString, deprecated
16
15
 
17
16
  from tcod.cffi import ffi, lib
18
17
 
@@ -24,31 +23,28 @@ F = TypeVar("F", bound=FuncType)
24
23
  T = TypeVar("T")
25
24
 
26
25
 
27
- def deprecate(message: str, category: type[Warning] = DeprecationWarning, stacklevel: int = 0) -> Callable[[F], F]:
28
- """Return a decorator which adds a warning to functions."""
26
+ def _deprecate_passthrough(
27
+ message: str, /, *, category: type[Warning] = DeprecationWarning, stacklevel: int = 0
28
+ ) -> Callable[[F], F]:
29
+ """Return a decorator which skips wrapping a warning onto functions. This is used for non-debug runs."""
29
30
 
30
31
  def decorator(func: F) -> F:
31
- if not __debug__:
32
- return func
32
+ return func
33
33
 
34
- @functools.wraps(func)
35
- def wrapper(*args: Any, **kwargs: Any) -> Any: # noqa: ANN401
36
- warnings.warn(message, category, stacklevel=stacklevel + 2)
37
- return func(*args, **kwargs)
34
+ return decorator
38
35
 
39
- return cast(F, wrapper)
40
36
 
41
- return decorator
37
+ deprecate = deprecated if __debug__ or TYPE_CHECKING else _deprecate_passthrough
42
38
 
43
39
 
44
40
  def pending_deprecate(
45
- message: str = "This function may be deprecated in the future."
41
+ message: LiteralString = "This function may be deprecated in the future."
46
42
  " Consider raising an issue on GitHub if you need this feature.",
47
43
  category: type[Warning] = PendingDeprecationWarning,
48
44
  stacklevel: int = 0,
49
45
  ) -> Callable[[F], F]:
50
46
  """Like deprecate, but the default parameters are filled out for a generic pending deprecation warning."""
51
- return deprecate(message, category, stacklevel)
47
+ return deprecate(message, category=category, stacklevel=stacklevel)
52
48
 
53
49
 
54
50
  def verify_order(order: Literal["C", "F"]) -> Literal["C", "F"]:
@@ -119,7 +115,7 @@ def _unicode(string: AnyStr, stacklevel: int = 2) -> str:
119
115
  stacklevel=stacklevel + 1,
120
116
  )
121
117
  return string.decode("latin-1")
122
- return string
118
+ return str(string)
123
119
 
124
120
 
125
121
  def _fmt(string: str, stacklevel: int = 2) -> bytes:
@@ -271,5 +267,5 @@ class TempImage:
271
267
  def _as_image(image: ArrayLike | tcod.image.Image) -> TempImage | tcod.image.Image:
272
268
  """Convert this input into an Image-like object."""
273
269
  if hasattr(image, "image_c"):
274
- return image # type: ignore
270
+ return image
275
271
  return TempImage(image)
@@ -29,8 +29,9 @@ from __future__ import annotations
29
29
 
30
30
  from typing import Any, Iterator
31
31
 
32
+ from typing_extensions import deprecated
33
+
32
34
  import tcod.random
33
- from tcod._internal import deprecate
34
35
  from tcod.cffi import ffi, lib
35
36
 
36
37
 
@@ -72,7 +73,7 @@ class BSP:
72
73
  self.children: tuple[()] | tuple[BSP, BSP] = ()
73
74
 
74
75
  @property
75
- @deprecate("This attribute has been renamed to `width`.", FutureWarning)
76
+ @deprecated("This attribute has been renamed to `width`.", category=FutureWarning)
76
77
  def w(self) -> int: # noqa: D102
77
78
  return self.width
78
79
 
@@ -81,7 +82,7 @@ class BSP:
81
82
  self.width = value
82
83
 
83
84
  @property
84
- @deprecate("This attribute has been renamed to `height`.", FutureWarning)
85
+ @deprecated("This attribute has been renamed to `height`.", category=FutureWarning)
85
86
  def h(self) -> int: # noqa: D102
86
87
  return self.height
87
88
 
@@ -177,7 +178,7 @@ class BSP:
177
178
  )
178
179
  self._unpack_bsp_tree(cdata)
179
180
 
180
- @deprecate("Use pre_order method instead of walk.")
181
+ @deprecated("Use pre_order method instead of walk.")
181
182
  def walk(self) -> Iterator[BSP]:
182
183
  """Iterate over this BSP's hierarchy in pre order.
183
184
 
@@ -59,7 +59,7 @@ if sys.platform == "win32":
59
59
 
60
60
 
61
61
  verify_dependencies()
62
- from tcod._libtcod import ffi, lib # noqa
62
+ from tcod._libtcod import ffi, lib # noqa: E402
63
63
 
64
64
  __sdl_version__ = get_sdl_version()
65
65
 
@@ -76,4 +76,4 @@ def _libtcod_log_watcher(message: Any, userdata: None) -> None: # noqa: ANN401
76
76
  lib.TCOD_set_log_callback(lib._libtcod_log_watcher, ffi.NULL)
77
77
  lib.TCOD_set_log_level(0)
78
78
 
79
- __all__ = ["ffi", "lib", "__sdl_version__"]
79
+ __all__ = ["__sdl_version__", "ffi", "lib"]
@@ -31,7 +31,7 @@ class Color(List[int]):
31
31
  return int(self[0])
32
32
 
33
33
  @r.setter
34
- @deprecate("Setting color attributes has been deprecated.", FutureWarning)
34
+ @deprecate("Setting color attributes has been deprecated.", category=FutureWarning)
35
35
  def r(self, value: int) -> None:
36
36
  self[0] = value & 0xFF
37
37
 
@@ -45,7 +45,7 @@ class Color(List[int]):
45
45
  return int(self[1])
46
46
 
47
47
  @g.setter
48
- @deprecate("Setting color attributes has been deprecated.", FutureWarning)
48
+ @deprecate("Setting color attributes has been deprecated.", category=FutureWarning)
49
49
  def g(self, value: int) -> None:
50
50
  self[1] = value & 0xFF
51
51
 
@@ -59,7 +59,7 @@ class Color(List[int]):
59
59
  return int(self[2])
60
60
 
61
61
  @b.setter
62
- @deprecate("Setting color attributes has been deprecated.", FutureWarning)
62
+ @deprecate("Setting color attributes has been deprecated.", category=FutureWarning)
63
63
  def b(self, value: int) -> None:
64
64
  self[2] = value & 0xFF
65
65
 
@@ -82,7 +82,7 @@ class Color(List[int]):
82
82
  return super().__getitem__("rgb".index(index))
83
83
  return super().__getitem__(index)
84
84
 
85
- @deprecate("This class will not be mutable in the future.", FutureWarning)
85
+ @deprecate("This class will not be mutable in the future.", category=FutureWarning)
86
86
  def __setitem__(self, index: Any, value: Any) -> None: # noqa: ANN401, D105
87
87
  if isinstance(index, str):
88
88
  super().__setitem__("rgb".index(index), value)
@@ -99,7 +99,7 @@ class Color(List[int]):
99
99
  except TypeError:
100
100
  return False
101
101
 
102
- @deprecate("Use NumPy instead for color math operations.", FutureWarning)
102
+ @deprecate("Use NumPy instead for color math operations.", category=FutureWarning)
103
103
  def __add__(self, other: object) -> Color: # type: ignore[override]
104
104
  """Add two colors together.
105
105
 
@@ -108,7 +108,7 @@ class Color(List[int]):
108
108
  """
109
109
  return Color._new_from_cdata(lib.TCOD_color_add(self, other))
110
110
 
111
- @deprecate("Use NumPy instead for color math operations.", FutureWarning)
111
+ @deprecate("Use NumPy instead for color math operations.", category=FutureWarning)
112
112
  def __sub__(self, other: object) -> Color:
113
113
  """Subtract one color from another.
114
114
 
@@ -117,7 +117,7 @@ class Color(List[int]):
117
117
  """
118
118
  return Color._new_from_cdata(lib.TCOD_color_subtract(self, other))
119
119
 
120
- @deprecate("Use NumPy instead for color math operations.", FutureWarning)
120
+ @deprecate("Use NumPy instead for color math operations.", category=FutureWarning)
121
121
  def __mul__(self, other: object) -> Color:
122
122
  """Multiply with a scaler or another color.
123
123
 
@@ -14,11 +14,11 @@ from typing import Any, Iterable
14
14
 
15
15
  import numpy as np
16
16
  from numpy.typing import ArrayLike, NDArray
17
- from typing_extensions import Literal
17
+ from typing_extensions import Literal, deprecated
18
18
 
19
19
  import tcod._internal
20
20
  import tcod.constants
21
- from tcod._internal import _check, _path_encode, deprecate
21
+ from tcod._internal import _check, _path_encode
22
22
  from tcod.cffi import ffi, lib
23
23
 
24
24
 
@@ -29,7 +29,7 @@ def _fmt(string: str) -> bytes:
29
29
 
30
30
  _root_console = None
31
31
 
32
- rgba_graphic = np.dtype([("ch", np.intc), ("fg", "4B"), ("bg", "4B")])
32
+ rgba_graphic: np.dtype[Any] = np.dtype([("ch", np.intc), ("fg", "4B"), ("bg", "4B")])
33
33
  """A NumPy :any:`dtype` compatible with :any:`Console.rgba`.
34
34
 
35
35
  This dtype is: ``np.dtype([("ch", np.intc), ("fg", "4B"), ("bg", "4B")])``
@@ -37,7 +37,7 @@ This dtype is: ``np.dtype([("ch", np.intc), ("fg", "4B"), ("bg", "4B")])``
37
37
  .. versionadded:: 12.3
38
38
  """
39
39
 
40
- rgb_graphic = np.dtype([("ch", np.intc), ("fg", "3B"), ("bg", "3B")])
40
+ rgb_graphic: np.dtype[Any] = np.dtype([("ch", np.intc), ("fg", "3B"), ("bg", "3B")])
41
41
  """A NumPy :any:`dtype` compatible with :any:`Console.rgb`.
42
42
 
43
43
  This dtype is: ``np.dtype([("ch", np.intc), ("fg", "3B"), ("bg", "3B")])``
@@ -104,7 +104,7 @@ class Console:
104
104
  DTYPE = rgba_graphic
105
105
 
106
106
  # A structured array type with the added "fg_rgb" and "bg_rgb" fields.
107
- _DTYPE_RGB = np.dtype(
107
+ _DTYPE_RGB: np.dtype[Any] = np.dtype(
108
108
  {
109
109
  "names": ["ch", "fg", "bg"],
110
110
  "formats": [np.int32, "3u1", "3u1"],
@@ -120,8 +120,9 @@ class Console:
120
120
  order: Literal["C", "F"] = "C",
121
121
  buffer: NDArray[Any] | None = None,
122
122
  ) -> None:
123
+ """Initialize the console."""
123
124
  self._key_color: tuple[int, int, int] | None = None
124
- self._order = tcod._internal.verify_order(order)
125
+ self._order: Literal["C", "F"] = tcod._internal.verify_order(order)
125
126
  if buffer is not None:
126
127
  if self._order == "F":
127
128
  buffer = buffer.transpose()
@@ -247,7 +248,7 @@ class Console:
247
248
  return self._tiles["ch"].T if self._order == "F" else self._tiles["ch"]
248
249
 
249
250
  @property
250
- @deprecate("This attribute has been renamed to `rgba`.", category=FutureWarning)
251
+ @deprecated("This attribute has been renamed to `rgba`.", category=FutureWarning)
251
252
  def tiles(self) -> NDArray[Any]:
252
253
  """An array of this consoles raw tile data.
253
254
 
@@ -263,7 +264,7 @@ class Console:
263
264
  return self.rgba
264
265
 
265
266
  @property
266
- @deprecate("This attribute has been renamed to `rgba`.", category=FutureWarning)
267
+ @deprecated("This attribute has been renamed to `rgba`.", category=FutureWarning)
267
268
  def buffer(self) -> NDArray[Any]:
268
269
  """An array of this consoles raw tile data.
269
270
 
@@ -275,7 +276,7 @@ class Console:
275
276
  return self.rgba
276
277
 
277
278
  @property
278
- @deprecate("This attribute has been renamed to `rgb`.", category=FutureWarning)
279
+ @deprecated("This attribute has been renamed to `rgb`.", category=FutureWarning)
279
280
  def tiles_rgb(self) -> NDArray[Any]:
280
281
  """An array of this consoles data without the alpha channel.
281
282
 
@@ -287,7 +288,7 @@ class Console:
287
288
  return self.rgb
288
289
 
289
290
  @property
290
- @deprecate("This attribute has been renamed to `rgb`.", category=FutureWarning)
291
+ @deprecated("This attribute has been renamed to `rgb`.", category=FutureWarning)
291
292
  def tiles2(self) -> NDArray[Any]:
292
293
  """This name is deprecated in favour of :any:`rgb`.
293
294
 
@@ -344,45 +345,78 @@ class Console:
344
345
  """
345
346
  return self.rgba.view(self._DTYPE_RGB)
346
347
 
347
- @property
348
+ _DEPRECATE_CONSOLE_DEFAULTS_MSG = """Console defaults have been deprecated.
349
+ Consider one of the following:
350
+
351
+ # Set parameters once then pass them as kwargs
352
+ DEFAULT_COLOR = {"bg": (0, 0, 127), "fg": (127, 127, 255)}
353
+ console.print(x, y, string, **DEFAULT_COLOR)
354
+
355
+ # Clear the console to a color and then skip setting colors on printing/drawing
356
+ console.clear(fg=(127, 127, 255), bg=(0, 0, 127))
357
+ console.print(x, y, string, fg=None)
358
+ """
359
+
360
+ @property # Getters used internally, so only deprecate the setters.
348
361
  def default_bg(self) -> tuple[int, int, int]:
349
- """Tuple[int, int, int]: The default background color."""
362
+ """Tuple[int, int, int]: The default background color.
363
+
364
+ .. deprecated:: 8.5
365
+ These should not be used. Prefer passing defaults as kwargs.
366
+
367
+ .. code-block::
368
+
369
+ DEFAULT_COLOR = {"bg": (0, 0, 127), "fg": (127, 127, 255)}
370
+ console.print(x, y, string, **DEFAULT_COLOR)
371
+ """
350
372
  color = self._console_data.back
351
373
  return color.r, color.g, color.b
352
374
 
353
375
  @default_bg.setter
354
- @deprecate("Console defaults have been deprecated.", category=FutureWarning)
376
+ @deprecated(_DEPRECATE_CONSOLE_DEFAULTS_MSG, category=FutureWarning)
355
377
  def default_bg(self, color: tuple[int, int, int]) -> None:
356
378
  self._console_data.back = color
357
379
 
358
380
  @property
359
381
  def default_fg(self) -> tuple[int, int, int]:
360
- """Tuple[int, int, int]: The default foreground color."""
382
+ """Tuple[int, int, int]: The default foreground color.
383
+
384
+ .. deprecated:: 8.5
385
+ These should not be used. Prefer passing defaults as kwargs.
386
+ """
361
387
  color = self._console_data.fore
362
388
  return color.r, color.g, color.b
363
389
 
364
390
  @default_fg.setter
365
- @deprecate("Console defaults have been deprecated.", category=FutureWarning)
391
+ @deprecated(_DEPRECATE_CONSOLE_DEFAULTS_MSG, category=FutureWarning)
366
392
  def default_fg(self, color: tuple[int, int, int]) -> None:
367
393
  self._console_data.fore = color
368
394
 
369
395
  @property
370
396
  def default_bg_blend(self) -> int:
371
- """int: The default blending mode."""
397
+ """int: The default blending mode.
398
+
399
+ .. deprecated:: 8.5
400
+ These should not be used. Prefer passing defaults as kwargs.
401
+ """
372
402
  return self._console_data.bkgnd_flag # type: ignore
373
403
 
374
404
  @default_bg_blend.setter
375
- @deprecate("Console defaults have been deprecated.", category=FutureWarning)
405
+ @deprecated(_DEPRECATE_CONSOLE_DEFAULTS_MSG, category=FutureWarning)
376
406
  def default_bg_blend(self, value: int) -> None:
377
407
  self._console_data.bkgnd_flag = value
378
408
 
379
409
  @property
380
410
  def default_alignment(self) -> int:
381
- """int: The default text alignment."""
411
+ """int: The default text alignment.
412
+
413
+ .. deprecated:: 8.5
414
+ These should not be used. Prefer passing defaults as kwargs.
415
+ """
382
416
  return self._console_data.alignment # type: ignore
383
417
 
384
418
  @default_alignment.setter
385
- @deprecate("Console defaults have been deprecated.", category=FutureWarning)
419
+ @deprecated(_DEPRECATE_CONSOLE_DEFAULTS_MSG, category=FutureWarning)
386
420
  def default_alignment(self, value: int) -> None:
387
421
  self._console_data.alignment = value
388
422
 
@@ -390,7 +424,7 @@ class Console:
390
424
  """Raise a warning for bad default values during calls to clear."""
391
425
  warnings.warn(
392
426
  f"Clearing with the console default values is deprecated.\nAdd {name}={value!r} to this call.",
393
- DeprecationWarning,
427
+ FutureWarning,
394
428
  stacklevel=3,
395
429
  )
396
430
 
@@ -518,7 +552,7 @@ class Console:
518
552
  stacklevel=3,
519
553
  )
520
554
 
521
- def print_( # noqa: PLR0913
555
+ def print_(
522
556
  self,
523
557
  x: int,
524
558
  y: int,
@@ -595,7 +629,7 @@ class Console:
595
629
  )
596
630
  )
597
631
 
598
- def get_height_rect(self, x: int, y: int, width: int, height: int, string: str) -> int: # noqa: PLR0913
632
+ def get_height_rect(self, x: int, y: int, width: int, height: int, string: str) -> int:
599
633
  """Return the height of this text word-wrapped into this rectangle.
600
634
 
601
635
  Args:
@@ -736,8 +770,8 @@ class Console:
736
770
  explicit.
737
771
  """
738
772
  self.__deprecate_defaults("draw_frame", bg_blend)
739
- string = _fmt(string) if string else ffi.NULL
740
- _check(lib.TCOD_console_printf_frame(self.console_c, x, y, width, height, clear, bg_blend, string))
773
+ string_: Any = _fmt(string) if string else ffi.NULL
774
+ _check(lib.TCOD_console_printf_frame(self.console_c, x, y, width, height, clear, bg_blend, string_))
741
775
 
742
776
  def blit( # noqa: PLR0913
743
777
  self,
@@ -829,7 +863,7 @@ class Console:
829
863
  bg_alpha,
830
864
  )
831
865
 
832
- @deprecate("Pass the key color to Console.blit instead of calling this function.")
866
+ @deprecated("Pass the key color to Console.blit instead of calling this function.")
833
867
  def set_key_color(self, color: tuple[int, int, int] | None) -> None:
834
868
  """Set a consoles blit transparent color.
835
869
 
@@ -921,7 +955,7 @@ class Console:
921
955
 
922
956
  def __repr__(self) -> str:
923
957
  """Return a string representation of this console."""
924
- return "tcod.console.Console(width=%i, height=%i, " "order=%r,buffer=\n%r)" % (
958
+ return "tcod.console.Console(width=%i, height=%i, order=%r,buffer=\n%r)" % (
925
959
  self.width,
926
960
  self.height,
927
961
  self._order,
@@ -930,7 +964,7 @@ class Console:
930
964
 
931
965
  def __str__(self) -> str:
932
966
  """Return a simplified representation of this consoles contents."""
933
- return "<%s>" % "\n ".join("".join(chr(c) for c in line) for line in self._tiles["ch"])
967
+ return "<{}>".format("\n ".join("".join(chr(c) for c in line) for line in self._tiles["ch"]))
934
968
 
935
969
  def print( # noqa: PLR0913
936
970
  self,
@@ -1233,7 +1267,7 @@ def get_height_rect(width: int, string: str) -> int:
1233
1267
  return int(lib.TCOD_console_get_height_rect_wn(width, len(string_), string_))
1234
1268
 
1235
1269
 
1236
- @deprecate("This function does not support contexts.", category=FutureWarning)
1270
+ @deprecated("This function does not support contexts.", category=FutureWarning)
1237
1271
  def recommended_size() -> tuple[int, int]:
1238
1272
  """Return the recommended size of a console for the current active window.
1239
1273
 
@@ -503,7 +503,7 @@ violet = Color(127, 0, 255)
503
503
  white = Color(255, 255, 255)
504
504
  yellow = Color(255, 255, 0)
505
505
 
506
- __all__ = [
506
+ __all__ = [ # noqa: RUF022
507
507
  "FOV_BASIC",
508
508
  "FOV_DIAMOND",
509
509
  "FOV_PERMISSIVE_0",