change: env cleanup
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import os
|
||||
from enum import Enum
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, Literal, Optional, Set
|
||||
from typing import Any
|
||||
|
||||
from pydantic import ImportString, NonNegativeFloat, ValidationInfo, model_validator
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
@@ -37,26 +36,4 @@ class Config(BaseSettings):
|
||||
log_file: Path | None = None
|
||||
|
||||
|
||||
def log_level() -> Set[Literal["critical", "error", "warning", "info", "debug"]]:
|
||||
policy = get(LOG_FILE_LEVEL)
|
||||
try:
|
||||
policy = policy.lower()
|
||||
if policy in {"critical", "error", "warning", "info", "debug"}:
|
||||
return policy
|
||||
except AttributeError:
|
||||
pass
|
||||
return None
|
||||
|
||||
|
||||
def log_print_level() -> Set[Literal["critical", "error", "warning", "info", "debug"]]:
|
||||
policy = get(LOG_PRINT_LEVEL)
|
||||
try:
|
||||
policy = policy.lower()
|
||||
if policy in {"critical", "error", "warning", "info", "debug"}:
|
||||
return policy
|
||||
except AttributeError:
|
||||
pass
|
||||
return None
|
||||
|
||||
|
||||
CONFIG = Config()
|
||||
|
||||
Reference in New Issue
Block a user