chore: refurish python code by applying Pylint linter rules (#8322)

This commit is contained in:
Bowen Liang
2024-09-13 22:42:08 +08:00
committed by GitHub
parent 1ab81b4972
commit a1104ab97e
126 changed files with 253 additions and 272 deletions

View File

@@ -134,7 +134,7 @@ class App(db.Model):
return False
if self.app_model_config.agent_mode_dict.get("enabled", False) and self.app_model_config.agent_mode_dict.get(
"strategy", ""
) in ["function_call", "react"]:
) in {"function_call", "react"}:
self.mode = AppMode.AGENT_CHAT.value
db.session.commit()
return True
@@ -1501,6 +1501,6 @@ class TraceAppConfig(db.Model):
"tracing_provider": self.tracing_provider,
"tracing_config": self.tracing_config_dict,
"is_active": self.is_active,
"created_at": self.created_at.__str__() if self.created_at else None,
"updated_at": self.updated_at.__str__() if self.updated_at else None,
"created_at": str(self.created_at) if self.created_at else None,
"updated_at": str(self.updated_at) if self.updated_at else None,
}