tomli/tomllib compatibility layer added.

Type annotation Self removed.

python version requirement changed.

tomli added as runtime dependency if py ver < 3.11

minor version bump.
This commit is contained in:
onyx-and-iris
2022-09-03 16:47:38 +01:00
parent aea2be624e
commit 4ef3d1f225
6 changed files with 29 additions and 59 deletions

View File

@@ -1,7 +1,10 @@
import itertools
from pathlib import Path
import tomllib
try:
import tomllib
except ModuleNotFoundError:
import tomli as tomllib
from .kinds import request_kind_map as kindmap
@@ -70,7 +73,6 @@ class TOMLStrBuilder:
class TOMLDataExtractor:
def __init__(self, file):
self._data = dict()
with open(file, "rb") as f:
self._data = tomllib.load(f)