@@ -5,7 +5,7 @@ from configparser import RawConfigParser
5
5
from re import Pattern
6
6
from threading import Thread
7
7
from typing import IO , Any , overload
8
- from typing_extensions import Literal , SupportsIndex , TypeAlias , TypedDict
8
+ from typing_extensions import Literal , Required , SupportsIndex , TypeAlias , TypedDict
9
9
10
10
from . import Filter , Filterer , Formatter , Handler , Logger , _FilterType , _FormatStyle , _Level
11
11
@@ -50,7 +50,8 @@ _FilterConfiguration: TypeAlias = _FilterConfigurationTypedDict | dict[str, Any]
50
50
# Handler config can have additional keys even when not providing a custom factory so we just use `dict`.
51
51
_HandlerConfiguration : TypeAlias = dict [str , Any ]
52
52
53
- class _OptionalDictConfigArgs (TypedDict , total = False ):
53
+ class _DictConfigArgs (TypedDict , total = False ):
54
+ version : Required [Literal [1 ]]
54
55
formatters : dict [str , _FormatterConfiguration ]
55
56
filters : dict [str , _FilterConfiguration ]
56
57
handlers : dict [str , _HandlerConfiguration ]
@@ -59,9 +60,6 @@ class _OptionalDictConfigArgs(TypedDict, total=False):
59
60
incremental : bool
60
61
disable_existing_loggers : bool
61
62
62
- class _DictConfigArgs (_OptionalDictConfigArgs , TypedDict ):
63
- version : Literal [1 ]
64
-
65
63
# Accept dict[str, Any] to avoid false positives if called with a dict
66
64
# type, since dict types are not compatible with TypedDicts.
67
65
#
0 commit comments