17 lines
370 B
Python
17 lines
370 B
Python
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
from app.storage.repository import JsonFileTaskRepository
|
|
|
|
|
|
DEFAULT_DATA_DIR = Path("data")
|
|
DEFAULT_TASKS_FILE = DEFAULT_DATA_DIR / "tasks.json"
|
|
|
|
|
|
def create_task_repository(
|
|
file_path: str | Path = DEFAULT_TASKS_FILE,
|
|
) -> JsonFileTaskRepository:
|
|
return JsonFileTaskRepository(file_path=file_path)
|
|
|