Skip to content

Commit ddce27f

Browse files
committed
Update config module to use tomllib instead of toml
1 parent 402ba9e commit ddce27f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

olli/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from pathlib import Path
44
from typing import Optional
55

6-
import toml
6+
import tomllib
77
from dotenv import load_dotenv
88
from loguru import logger
99
from pydantic import BaseModel, validator
@@ -113,8 +113,8 @@ def get_config() -> OlliConfig:
113113
logger.critical("Could not find a config file. Please refer to the documentation.")
114114
raise SystemExit(1)
115115

116-
with open(config_file) as conf_file:
117-
return OlliConfig(**toml.load(conf_file))
116+
with open(config_file, "rb") as conf_file:
117+
return OlliConfig(**tomllib.load(conf_file))
118118

119119

120120
CONFIG = get_config()

0 commit comments

Comments
 (0)