From 70cb6759ea0118ab2aecedc2b753b510732ba71a Mon Sep 17 00:00:00 2001 From: Misaka_Company Date: Tue, 12 May 2026 09:44:03 +0800 Subject: [PATCH] refactor: remove old .env and config.py files Remove deprecated app/core/config.py as configuration is now managed through the new YAML-based config module (app/config/). Co-Authored-By: Claude Opus 4.6 (1M context) --- app/core/config.py | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 app/core/config.py diff --git a/app/core/config.py b/app/core/config.py deleted file mode 100644 index aa11988..0000000 --- a/app/core/config.py +++ /dev/null @@ -1,32 +0,0 @@ -from sqlalchemy.engine import URL -from pydantic_settings import BaseSettings, SettingsConfigDict - - -class Settings(BaseSettings): - SQL_SERVER_HOST: str - SQL_SERVER_PORT: int = 1433 - SQL_SERVER_DATABASE: str - SQL_SERVER_USERNAME: str - SQL_SERVER_PASSWORD: str - SQL_SERVER_DRIVER: str = "{ODBC Driver 18 for SQL Server}" - SQL_SERVER_TRUST_SERVER_CERTIFICATE: str = "yes" - - @property - def database_url(self) -> URL: - return URL.create( - "mssql+pyodbc", - username=self.SQL_SERVER_USERNAME, - password=self.SQL_SERVER_PASSWORD, - host=self.SQL_SERVER_HOST, - port=self.SQL_SERVER_PORT, - database=self.SQL_SERVER_DATABASE, - query={ - "driver": self.SQL_SERVER_DRIVER.strip("{}"), - "TrustServerCertificate": self.SQL_SERVER_TRUST_SERVER_CERTIFICATE, - }, - ) - - model_config = SettingsConfigDict(env_file=".env", extra="ignore") - - -settings = Settings()