- Reformatted function signatures in `organization_service.py` and `task_service.py` for better alignment. - Updated import statements across multiple files for consistency and organization. - Enhanced test files by improving formatting and ensuring consistent use of async session factories. - Added type hints and improved type safety in various service and test files. - Adjusted `pyproject.toml` to include configuration for isort, mypy, and ruff for better code quality checks. - Cleaned up unused imports and organized existing ones in several test files.
This commit is contained in:
+7
-2
@@ -1,4 +1,5 @@
|
||||
"""Application settings using Pydantic Settings."""
|
||||
|
||||
from pydantic import Field, SecretStr
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
@@ -15,7 +16,9 @@ class Settings(BaseSettings):
|
||||
db_port: int = Field(default=5432, description="Database port")
|
||||
db_name: str = Field(default="test_task_crm", description="Database name")
|
||||
db_user: str = Field(default="postgres", description="Database user")
|
||||
db_password: SecretStr = Field(default=SecretStr("postgres"), description="Database user password")
|
||||
db_password: SecretStr = Field(
|
||||
default=SecretStr("postgres"), description="Database user password"
|
||||
)
|
||||
database_url_override: str | None = Field(
|
||||
default=None,
|
||||
alias="DATABASE_URL",
|
||||
@@ -28,7 +31,9 @@ class Settings(BaseSettings):
|
||||
refresh_token_expire_days: int = 7
|
||||
redis_enabled: bool = Field(default=False, description="Toggle Redis-backed cache usage")
|
||||
redis_url: str = Field(default="redis://localhost:6379/0", description="Redis connection URL")
|
||||
analytics_cache_ttl_seconds: int = Field(default=120, ge=1, description="TTL for cached analytics responses")
|
||||
analytics_cache_ttl_seconds: int = Field(
|
||||
default=120, ge=1, description="TTL for cached analytics responses"
|
||||
)
|
||||
analytics_cache_backoff_ms: int = Field(
|
||||
default=200,
|
||||
ge=0,
|
||||
|
||||
Reference in New Issue
Block a user