mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
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())
|