Init: mediaserver

This commit is contained in:
2023-02-08 12:13:28 +01:00
parent 848bc9739c
commit f7c23d4ba9
31914 changed files with 6175775 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
"""Nearly empty __init__.py to keep pylint happy."""
from __future__ import annotations

View File

@@ -0,0 +1,16 @@
"""Packaging compatibility."""
from __future__ import annotations
try:
from packaging import (
specifiers,
version,
)
SpecifierSet = specifiers.SpecifierSet
Version = version.Version
PACKAGING_IMPORT_ERROR = None
except ImportError as ex:
SpecifierSet = None # pylint: disable=invalid-name
Version = None # pylint: disable=invalid-name
PACKAGING_IMPORT_ERROR = ex

View File

@@ -0,0 +1,20 @@
"""PyYAML compatibility."""
from __future__ import annotations
from functools import (
partial,
)
try:
import yaml as _yaml
YAML_IMPORT_ERROR = None
except ImportError as ex:
yaml_load = None # pylint: disable=invalid-name
YAML_IMPORT_ERROR = ex
else:
try:
_SafeLoader = _yaml.CSafeLoader
except AttributeError:
_SafeLoader = _yaml.SafeLoader
yaml_load = partial(_yaml.load, Loader=_SafeLoader)