mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-15 07:34:27 -04:00
swap AttrDict for benedict everywhere
This commit is contained in:
parent
b611c0114c
commit
8c8c64d90f
1 changed files with 7 additions and 5 deletions
|
@ -2,17 +2,19 @@ from pathlib import Path
|
||||||
from typing import Optional, Dict, Union, Tuple, Callable, Pattern, Type, Any, List
|
from typing import Optional, Dict, Union, Tuple, Callable, Pattern, Type, Any, List
|
||||||
from mypy_extensions import TypedDict
|
from mypy_extensions import TypedDict
|
||||||
|
|
||||||
|
from benedict import benedict
|
||||||
|
|
||||||
SimpleConfigValue = Union[str, bool, int, None, Pattern, Dict[str, Any]]
|
SimpleConfigValue = Union[str, bool, int, None, Pattern, Dict[str, Any]]
|
||||||
SimpleConfigValueDict = Dict[str, SimpleConfigValue]
|
SimpleConfigValueDict = Dict[str, SimpleConfigValue]
|
||||||
SimpleConfigValueGetter = Callable[[], SimpleConfigValue]
|
SimpleConfigValueGetter = Callable[[], SimpleConfigValue]
|
||||||
ConfigValue = Union[SimpleConfigValue, SimpleConfigValueDict, SimpleConfigValueGetter]
|
ConfigValue = Union[SimpleConfigValue, SimpleConfigValueDict, SimpleConfigValueGetter]
|
||||||
|
|
||||||
class AttrDict(dict):
|
# class AttrDict(dict):
|
||||||
def __init__(self, *args, **kwargs):
|
# def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
# super().__init__(*args, **kwargs)
|
||||||
self.__dict__ = self
|
# self.__dict__ = self
|
||||||
|
AttrDict = benedict # https://github.com/fabiocaccamo/python-benedict/
|
||||||
|
|
||||||
|
|
||||||
class BaseConfig(TypedDict):
|
class BaseConfig(TypedDict):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue