mirror of
https://github.com/YuzuZensai/spleeter.git
synced 2026-01-31 14:58:23 +00:00
🐛 restore alternative import
This commit is contained in:
@@ -3,11 +3,17 @@
|
|||||||
|
|
||||||
""" Module that provides configuration loading function. """
|
""" Module that provides configuration loading function. """
|
||||||
|
|
||||||
import importlib.resources as loader
|
|
||||||
import json
|
import json
|
||||||
from os.path import exists
|
from os.path import exists
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
|
try:
|
||||||
|
import importlib.resources as loader
|
||||||
|
except ImportError:
|
||||||
|
# Try backported to PY<37 `importlib_resources`.
|
||||||
|
# pyright: reportMissingImports=false
|
||||||
|
import importlib_resources as loader
|
||||||
|
|
||||||
from .. import SpleeterError, resources
|
from .. import SpleeterError, resources
|
||||||
|
|
||||||
__email__ = "spleeter@deezer.com"
|
__email__ = "spleeter@deezer.com"
|
||||||
|
|||||||
Reference in New Issue
Block a user