mirror of
https://github.com/vegu-ai/talemate.git
synced 2025-12-25 07:59:36 +01:00
linting
This commit is contained in:
@@ -58,9 +58,7 @@ class Character(pydantic.BaseModel):
|
||||
example_dialogue: list[str] = pydantic.Field(default_factory=list)
|
||||
|
||||
# attribute and detail storage
|
||||
base_attributes: dict = pydantic.Field(
|
||||
default_factory=dict
|
||||
)
|
||||
base_attributes: dict = pydantic.Field(default_factory=dict)
|
||||
details: dict[str, str] = pydantic.Field(default_factory=dict)
|
||||
|
||||
# helpful references
|
||||
|
||||
@@ -191,7 +191,7 @@ def export_node_definitions() -> dict:
|
||||
field_defs[prop_name] = prop_data.model_dump()
|
||||
|
||||
exported_node = {"fields": field_defs, **node.model_dump()}
|
||||
|
||||
|
||||
if node._module_path:
|
||||
try:
|
||||
exported_node["module_path"] = relative_to_root(Path(node._module_path))
|
||||
@@ -200,7 +200,7 @@ def export_node_definitions() -> dict:
|
||||
"export_node_definitions: failed to get relative path",
|
||||
module_path=node._module_path,
|
||||
)
|
||||
|
||||
|
||||
exported_node["selectable"] = node._export_definition
|
||||
|
||||
exported_node.pop("nodes", None)
|
||||
|
||||
@@ -17,6 +17,7 @@ TTS_DIR = TALEMATE_ROOT / "tts"
|
||||
|
||||
CONFIG_FILE = TALEMATE_ROOT / "config.yaml"
|
||||
|
||||
|
||||
def relative_to_root(path: Path | str) -> Path:
|
||||
if isinstance(path, str):
|
||||
path = Path(path)
|
||||
|
||||
@@ -916,7 +916,7 @@ class Scene(Emitter):
|
||||
|
||||
if isinstance(actor, Player):
|
||||
actor.character.is_player = True
|
||||
|
||||
|
||||
if actor.character.name not in self.character_data:
|
||||
self.character_data[actor.character.name] = actor.character
|
||||
|
||||
|
||||
Reference in New Issue
Block a user