mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-03 13:19:16 +00:00
- Move them to utils.helper.py for reuse - Import those modules where required - Delete duplicate methods defined in org_to_jsonl.py, asymmetric.py
10 lines
217 B
Python
10 lines
217 B
Python
import pathlib
|
|
|
|
|
|
def is_none_or_empty(item):
|
|
return item == None or (hasattr(item, '__iter__') and len(item) == 0)
|
|
|
|
|
|
def get_absolute_path(filepath):
|
|
return str(pathlib.Path(filepath).expanduser().absolute())
|