Disable python warning unless in development

This commit is contained in:
Yiorgis Gozadinos 2025-08-08 17:31:42 +02:00
parent ad4b655a31
commit 22ed9ca51e
No known key found for this signature in database
2 changed files with 5 additions and 1 deletions

View file

@ -1,4 +1,5 @@
import asyncio
import warnings
from importlib.metadata import version
from pathlib import Path
@ -9,6 +10,9 @@ from haiku.rag.app import HaikuRAGApp
from haiku.rag.config import Config
from haiku.rag.utils import is_up_to_date
if not Config.ENV == "development":
warnings.filterwarnings("ignore")
cli = typer.Typer(
context_settings={"help_option_names": ["-h", "--help"]}, no_args_is_help=True
)

View file

@ -10,7 +10,7 @@ load_dotenv()
class AppConfig(BaseModel):
ENV: str = "development"
ENV: str = "production"
DEFAULT_DATA_DIR: Path = get_default_data_dir()
MONITOR_DIRECTORIES: list[Path] = []