fix: auto-fix code issues (cron)
- 修复PEP8格式问题(行长度超过120字符) - 修复类型注解(添加__init__和_get_db返回类型) - 删除__pycache__缓存文件 - 优化长SQL查询语句格式
This commit is contained in:
@@ -167,7 +167,8 @@ class DatabaseManager:
|
||||
def create_entity(self, entity: Entity) -> Entity:
|
||||
conn = self.get_conn()
|
||||
conn.execute(
|
||||
"""INSERT INTO entities (id, project_id, name, canonical_name, type, definition, aliases, created_at, updated_at)
|
||||
"""INSERT INTO entities (id, project_id, name, canonical_name, type,
|
||||
definition, aliases, created_at, updated_at)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)""",
|
||||
(
|
||||
entity.id,
|
||||
@@ -736,7 +737,8 @@ class DatabaseManager:
|
||||
now = datetime.now().isoformat()
|
||||
conn.execute(
|
||||
"""INSERT INTO attribute_templates
|
||||
(id, project_id, name, type, options, default_value, description, is_required, sort_order, created_at, updated_at)
|
||||
(id, project_id, name, type, options, default_value, description,
|
||||
is_required, sort_order, created_at, updated_at)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""",
|
||||
(
|
||||
template.id,
|
||||
|
||||
Reference in New Issue
Block a user