17 lines
381 B
Python
17 lines
381 B
Python
import os
|
|
import yaml
|
|
|
|
def load_config():
|
|
"""Load configuration from file."""
|
|
config_paths = [
|
|
'.git-commit-ai/config.yaml',
|
|
os.path.expanduser('~/.config/git-commit-ai/config.yaml')
|
|
]
|
|
|
|
for path in config_paths:
|
|
if os.path.exists(path):
|
|
with open(path) as f:
|
|
return yaml.safe_load(f) or {}
|
|
|
|
return {}
|