feat: add typed DAO layer for schedule_rules and task_definitions (#19)

This commit is contained in:
Joshua King
2026-09-14 07:34:42 -04:00
parent 43b20f2b12
commit 46a0a3445c
3 changed files with 1096 additions and 0 deletions
+4
View File
@@ -478,11 +478,15 @@ def test_children_and_admin_sql_lives_only_in_dao_module() -> None:
allowed = {
"custom_components/nestquest/dao_children.py", # the DAO itself
"custom_components/nestquest/dao_rules.py", # validates child
# activeness on assignment (FK to children, done-condition
# 'validates that the assigned child is active')
"custom_components/nestquest/schema.py", # declares the DDL
"custom_components/nestquest/migrations.py", # applies the DDL
"tests/test_schema.py", # tests the DDL
"tests/test_migrations.py", # tests migration application
"tests/test_dao_children.py", # this file, scanned separately
"tests/test_dao_rules.py", # rules/definitions guard, own scope
}
sql_pattern = re.compile(
r"(FROM|INTO|UPDATE|DELETE\s+FROM|JOIN)\s+"