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:28:19 +01:00
parent af0740ddec
commit 48b2857c58
8 changed files with 46 additions and 71 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)