feat: replace tomli with tomllib
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
import tomllib
|
||||
from typing import Any
|
||||
|
||||
import dotenv
|
||||
import tomli
|
||||
|
||||
from ..core import Pipe
|
||||
|
||||
@@ -22,7 +22,7 @@ class FileData:
|
||||
|
||||
def _load_data(self):
|
||||
if self._filepath.suffix == ".toml":
|
||||
return tomli.loads(self._filepath.read_text())
|
||||
return tomllib.loads(self._filepath.read_text())
|
||||
elif self._filepath.suffix == ".json":
|
||||
return json.loads(self._filepath.read_text())
|
||||
elif self._filepath.suffix == ".env" or self._filepath.name == ".env":
|
||||
|
||||
Reference in New Issue
Block a user