Utils: YAML goes brrrt (#2868)

Also tests to validate we dont break the API.
This commit is contained in:
black-sliver
2024-02-27 08:44:34 +01:00
committed by GitHub
parent 738a9ebb7d
commit c126418f35
2 changed files with 71 additions and 5 deletions

View File

@@ -19,14 +19,12 @@ import warnings
from argparse import Namespace
from settings import Settings, get_settings
from typing import BinaryIO, Coroutine, Optional, Set, Dict, Any, Union
from yaml import load, load_all, dump, SafeLoader
from yaml import load, load_all, dump
try:
from yaml import CLoader as UnsafeLoader
from yaml import CDumper as Dumper
from yaml import CLoader as UnsafeLoader, CSafeLoader as SafeLoader, CDumper as Dumper
except ImportError:
from yaml import Loader as UnsafeLoader
from yaml import Dumper
from yaml import Loader as UnsafeLoader, SafeLoader, Dumper
if typing.TYPE_CHECKING:
import tkinter