mirror of https://github.com/flaggo/pydu.git
add type hint for dict.CaseInsensitiveDict
This commit is contained in:
parent
3ffb75d062
commit
43c4dfb042
|
@ -67,7 +67,7 @@ class CaseInsensitiveDict(collections.MutableMapping):
|
||||||
behavior is undefined.
|
behavior is undefined.
|
||||||
"""
|
"""
|
||||||
def __init__(self, data=None, **kwargs):
|
def __init__(self, data=None, **kwargs):
|
||||||
self._store = dict()
|
self._store = {}
|
||||||
if data is None:
|
if data is None:
|
||||||
data = {}
|
data = {}
|
||||||
self.update(data, **kwargs)
|
self.update(data, **kwargs)
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
import collections
|
||||||
|
from typing import Iterable, Tuple, Any, Optional
|
||||||
|
|
||||||
|
|
||||||
|
class CaseInsensitiveDict(collections.MutableMapping):
|
||||||
|
_store = ... # type: dict
|
||||||
|
def __init__(self, data: Optional(dict), **kwargs) -> None: ...
|
||||||
|
def lower_items(self) -> Iterable[Tuple[str, Any]]: ...
|
Loading…
Reference in New Issue