mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2026-04-18 12:33:34 +00:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user