from __future__ import annotations import os from pathlib import Path from PySide6.QtCore import QStandardPaths from clfgui.kernel import default_db_path def qstandard_db_path() -> Path: if os.environ.get("CLFGUI_DB_PATH"): return default_db_path() location = QStandardPaths.writableLocation(QStandardPaths.StandardLocation.AppDataLocation) if not location: return default_db_path() return Path(location) / "clfgui.sqlite3"