mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
- Cleaner, more idiomatic usage of a global variable - Simplifies mocking when testing client in pytest as setting wrapped in object rather than a simple type. So passed around by reference
21 lines
383 B
Python
21 lines
383 B
Python
# System Packages
|
|
from enum import Enum
|
|
from dataclasses import dataclass
|
|
|
|
|
|
class SearchType(str, Enum):
|
|
Notes = "notes"
|
|
Ledger = "ledger"
|
|
Music = "music"
|
|
Image = "image"
|
|
|
|
|
|
@dataclass
|
|
class SearchSettings():
|
|
notes_search_enabled: bool = False
|
|
ledger_search_enabled: bool = False
|
|
music_search_enabled: bool = False
|
|
image_search_enabled: bool = False
|
|
|
|
|