Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 0 additions & 88 deletions examples/health_plugin.py

This file was deleted.

Empty file added py.typed
Empty file.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies = [
"types-networkx>=3.5.0.20251106",
"typing-extensions>=4.15.0",
]
license = "CC0-1.0"
license = "Unlicense"
license-files = ["LICENSE"]

[project.urls]
Expand Down
7 changes: 3 additions & 4 deletions src/snakia/core/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,26 @@

from .ecs import System
from .es import Dispatcher
from .loader.loader import Loader


class Engine:
__slots__ = (
"system",
"dispatcher",
"loader",
"__system_thread",
"__dispatcher_thread",
)

def __init__(self) -> None:
self.system: Final = System()
self.dispatcher: Final = Dispatcher()
self.loader: Final = Loader(self)
self.__system_thread: threading.Thread | None = None
self.__dispatcher_thread: threading.Thread | None = None

def start(self) -> None:
self.__system_thread = threading.Thread(target=self.system.start, daemon=False)
self.__system_thread = threading.Thread(
target=self.system.start, daemon=False
)
self.__dispatcher_thread = threading.Thread(
target=self.dispatcher.start, daemon=False
)
Expand Down
6 changes: 0 additions & 6 deletions src/snakia/core/loader/__init__.py

This file was deleted.

18 changes: 0 additions & 18 deletions src/snakia/core/loader/loadable.py

This file was deleted.

26 changes: 0 additions & 26 deletions src/snakia/core/loader/loader.py

This file was deleted.

35 changes: 0 additions & 35 deletions src/snakia/core/loader/meta.py

This file was deleted.

72 changes: 0 additions & 72 deletions src/snakia/core/loader/plugin.py

This file was deleted.

14 changes: 0 additions & 14 deletions src/snakia/core/loader/plugin_processor.py

This file was deleted.

3 changes: 1 addition & 2 deletions src/snakia/core/rx/base_bindable.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def default_value(self) -> T:
def value(self) -> T:
if self.has_value:
return self.__value
else:
return self.default_value
return self.default_value

@property
def has_value(self) -> bool:
Expand Down
4 changes: 2 additions & 2 deletions src/snakia/core/rx/combines.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def combine(
)

def subscriber(_: ValueChanged[Any]) -> None:
combined.set(combiner(*[*map(lambda s: s.value, sources)]))
combined.set(combiner(*map(lambda s: s.value, sources)))

for source in sources:
if isinstance(source, Bindable):
Expand Down Expand Up @@ -185,7 +185,7 @@ def async_combine(
)

async def subscriber(_: ValueChanged[Any]) -> None:
result = await combiner(*[*map(lambda s: s.value, sources)])
result = await combiner(*map(lambda s: s.value, sources))
await combined.set(result)

for source in sources:
Expand Down
4 changes: 4 additions & 0 deletions src/snakia/field/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
from .field import Field
from .float import FloatField
from .int import IntField
from .list import ListField
from .optional import OptionalField
from .str import StrField

__all__ = [
Expand All @@ -11,5 +13,7 @@
"BoolField",
"FloatField",
"IntField",
"ListField",
"OptionalField",
"StrField",
]
Loading
Loading