Skip to content

Commit dae929b

Browse files
committed
refactor: rename python binding to _papi
1 parent 4b97869 commit dae929b

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ execute_process(
2626
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
2727
find_package(pybind11 CONFIG REQUIRED)
2828

29-
pybind11_add_module(_${PROJECT_NAME} endstone_papi/pypapi.cpp)
29+
pybind11_add_module(_${PROJECT_NAME} endstone_papi/_papi.cpp)
3030
target_include_directories(_${PROJECT_NAME} PRIVATE include)
3131
target_link_libraries(_${PROJECT_NAME} PRIVATE endstone::endstone)
32-
install(TARGETS _papi DESTINATION "endstone_papi" COMPONENT python)
32+
install(TARGETS _${PROJECT_NAME} DESTINATION "endstone_papi" COMPONENT python)
3333
install(DIRECTORY include/ DESTINATION "endstone_papi/include" COMPONENT python)
3434

3535
add_subdirectory(examples/cpp)

endstone_papi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .pypapi import PlaceholderAPI
1+
from .papi import PlaceholderAPI
22
from .plugin import PlaceholderAPIPlugin
33

44
__all__ = ["PlaceholderAPI", "PlaceholderAPIPlugin"]
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44
from typing import Callable
55
from endstone.plugin import Plugin
6-
from .pypapi import PlaceholderAPI
6+
from ._papi import PlaceholderAPI as IPlaceholderAPI
77
from endstone import Player
88
from .chars_replacer import apply
99

1010

11-
class PyPlaceholderAPI(PlaceholderAPI):
11+
class PlaceholderAPI(IPlaceholderAPI):
1212
def __init__(self, plugin: Plugin):
13-
PlaceholderAPI.__init__(self)
13+
IPlaceholderAPI.__init__(self)
1414
self._plugin = plugin
1515
self._registry = {}
1616
self._placeholder_pattern = re.compile(r"[{]([^{}]+)[}]")

0 commit comments

Comments
 (0)