refactor: add type hints and FileParser.is_supported() helper
- Add return type annotation (list[str]) to Config.validate() - Add type annotations (msg: str, -> None) to logger convenience functions - Add FileParser.is_supported() classmethod for checking file format support
This commit is contained in:
@@ -64,9 +64,9 @@ class Config:
|
||||
REPORT_AGENT_TEMPERATURE = float(os.environ.get('REPORT_AGENT_TEMPERATURE', '0.5'))
|
||||
|
||||
@classmethod
|
||||
def validate(cls):
|
||||
def validate(cls) -> list[str]:
|
||||
"""验证必要配置"""
|
||||
errors = []
|
||||
errors: list[str] = []
|
||||
if not cls.LLM_API_KEY:
|
||||
errors.append("LLM_API_KEY 未配置")
|
||||
if not cls.ZEP_API_KEY:
|
||||
|
||||
Reference in New Issue
Block a user