chore: Add pylint for DB-GPT core lib (#1076)

This commit is contained in:
Fangyin Cheng
2024-01-16 17:36:26 +08:00
committed by GitHub
parent 3a54d1ef9a
commit 40c853575a
79 changed files with 2213 additions and 839 deletions

View File

@@ -1,6 +1,6 @@
import os
from functools import cache
from typing import Any, Dict, Optional
from typing import Any, Dict, Optional, cast
class AppConfig:
@@ -46,7 +46,7 @@ class AppConfig:
"""
env_lang = (
"zh"
if os.getenv("LANG") and os.getenv("LANG").startswith("zh")
if os.getenv("LANG") and cast(str, os.getenv("LANG")).startswith("zh")
else default
)
return self.get("dbgpt.app.global.language", env_lang)