Skip to content

Commit a140581

Browse files
committed
Rename tcod.loader to tcod.cffi.
Should be a better name since this is where the cffi API is exported from.
1 parent 64cb438 commit a140581

24 files changed

+24
-24
lines changed

tcod/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
__path__ = extend_path(__path__, __name__)
1515

1616
from tcod import bsp, color, console, constants, context, event, image, los, map, noise, path, random, tileset
17+
from tcod.cffi import __sdl_version__, ffi, lib
1718
from tcod.console import Console
1819
from tcod.constants import * # noqa: F403
1920
from tcod.libtcodpy import * # noqa: F403
20-
from tcod.loader import __sdl_version__, ffi, lib
2121
from tcod.version import __version__
2222

2323

tcod/_internal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from numpy.typing import ArrayLike, NDArray
1111
from typing_extensions import Literal
1212

13-
from tcod.loader import ffi, lib
13+
from tcod.cffi import ffi, lib
1414

1515
FuncType = Callable[..., Any]
1616
F = TypeVar("F", bound=FuncType)

tcod/bsp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
import tcod.random
3232
from tcod._internal import deprecate
33-
from tcod.loader import ffi, lib
33+
from tcod.cffi import ffi, lib
3434

3535

3636
class BSP:

tcod/loader.py renamed to tcod/cffi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def get_sdl_version() -> str:
6464

6565

6666
@ffi.def_extern() # type: ignore
67-
def _libtcod_log_watcher(message: Any, userdata: None) -> None:
67+
def _libtcod_log_watcher(message: Any, userdata: None) -> None: # noqa: ANN401
6868
text = str(ffi.string(message.message), encoding="utf-8")
6969
source = str(ffi.string(message.source), encoding="utf-8")
7070
level = int(message.level)

tcod/color.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import Any, List
66

77
from tcod._internal import deprecate
8-
from tcod.loader import lib
8+
from tcod.cffi import lib
99

1010

1111
class Color(List[int]):

tcod/console.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import tcod._internal
1717
import tcod.constants
1818
from tcod._internal import _check, deprecate
19-
from tcod.loader import ffi, lib
19+
from tcod.cffi import ffi, lib
2020

2121

2222
def _fmt(string: str) -> bytes:

tcod/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
import tcod.sdl.video
6666
import tcod.tileset
6767
from tcod._internal import _check, _check_warn, pending_deprecate
68-
from tcod.loader import ffi, lib
68+
from tcod.cffi import ffi, lib
6969

7070
__all__ = (
7171
"Context",

tcod/event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@
9191

9292
import tcod.event_constants
9393
import tcod.sdl.joystick
94+
from tcod.cffi import ffi, lib
9495
from tcod.event_constants import * # noqa: F403
9596
from tcod.event_constants import KMOD_ALT, KMOD_CTRL, KMOD_GUI, KMOD_SHIFT
96-
from tcod.loader import ffi, lib
9797
from tcod.sdl.joystick import _HAT_DIRECTIONS
9898

9999
T = TypeVar("T")

tcod/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import tcod.console
2121
from tcod._internal import _console, deprecate
22-
from tcod.loader import ffi, lib
22+
from tcod.cffi import ffi, lib
2323

2424

2525
class Image:

tcod/libtcodpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
deprecate,
3737
pending_deprecate,
3838
)
39+
from tcod.cffi import ffi, lib
3940
from tcod.color import Color
4041
from tcod.constants import * # noqa: F403
4142
from tcod.constants import (
@@ -49,7 +50,6 @@
4950
KEY_RELEASED,
5051
NOISE_DEFAULT,
5152
)
52-
from tcod.loader import ffi, lib
5353

5454
# ruff: noqa: ANN401 PLR0913 # Functions are too deprecated to make changes.
5555

0 commit comments

Comments
 (0)