11from _typeshed import ReadableBuffer , SupportsRead , SupportsWrite
2- from collections .abc import Callable , Mapping
2+ from collections .abc import Callable , Container , Mapping
33from types import GeneratorType
44from typing import Any , overload
55from typing_extensions import TypeAlias
@@ -24,15 +24,15 @@ class _DictSAXHandler:
2424 item_callback : Callable [[list [tuple [str , _AttrDict | None ]], str | _AttrDict | None ], bool ]
2525 attr_prefix : str
2626 cdata_key : str
27- force_cdata : bool
27+ force_cdata : bool | Container [ str ] | Callable [[ tuple [ str , _AttrDict | None ], str , str ], bool ]
2828 cdata_separator : str
2929 postprocessor : Callable [[list [tuple [str , _AttrDict | None ]], str , _AttrValue ], tuple [str , _AttrValue ]] | None
3030 dict_constructor : type [dict [str , str ]]
3131 strip_whitespace : bool
3232 namespace_separator : str
3333 namespaces : dict [str , str ] | None
3434 namespace_declarations : dict [str , str ]
35- force_list : bool | tuple [str ] | Callable [[tuple [str , _AttrDict | None ], str , str ], bool ] | None
35+ force_list : bool | Container [str ] | Callable [[tuple [str , _AttrDict | None ], str , str ], bool ] | None
3636 comment_key : str
3737 def __init__ (
3838 self ,
@@ -41,14 +41,14 @@ class _DictSAXHandler:
4141 xml_attribs : bool = True ,
4242 attr_prefix : str = "@" ,
4343 cdata_key : str = "#text" ,
44- force_cdata : bool = False ,
44+ force_cdata : bool | Container [ str ] | Callable [[ tuple [ str , _AttrDict | None ], str , str ], bool ] = False ,
4545 cdata_separator : str = "" ,
4646 postprocessor : Callable [[list [tuple [str , _AttrDict | None ]], str , _AttrValue ], tuple [str , _AttrValue ]] | None = None ,
4747 dict_constructor : type [dict [str , str ]] = ...,
4848 strip_whitespace : bool = True ,
4949 namespace_separator : str = ":" ,
5050 namespaces : dict [str , str ] | None = None ,
51- force_list : bool | tuple [str ] | Callable [[tuple [str , _AttrDict | None ], str , str ], bool ] | None = None ,
51+ force_list : bool | Container [str ] | Callable [[tuple [str , _AttrDict | None ], str , str ], bool ] | None = None ,
5252 comment_key : str = "#comment" ,
5353 ) -> None : ...
5454 def startNamespaceDecl (self , prefix : str , uri : str ) -> None : ...
@@ -72,13 +72,13 @@ def parse(
7272 xml_attribs : bool = True ,
7373 attr_prefix : str = "@" ,
7474 cdata_key : str = "#text" ,
75- force_cdata : bool = False ,
75+ force_cdata : bool | Container [ str ] | Callable [[ tuple [ str , _AttrDict | None ], str , str ], bool ] = False ,
7676 cdata_separator : str = "" ,
7777 postprocessor : Callable [[list [tuple [str , _AttrDict | None ]], str , _AttrValue ], tuple [str , _AttrValue ]] | None = None ,
7878 dict_constructor : type [dict [str , str ]] = ...,
7979 strip_whitespace : bool = True ,
8080 namespaces : dict [str , str ] | None = None ,
81- force_list : bool | tuple [str ] | Callable [[tuple [str , _AttrDict | None ], str , str ], bool ] | None = None ,
81+ force_list : bool | Container [str ] | Callable [[tuple [str , _AttrDict | None ], str , str ], bool ] | None = None ,
8282 comment_key : str = "#comment" ,
8383) -> dict [str , Any ]: ...
8484@overload
0 commit comments