44
44
45
45
if sys .version_info [:3 ] < (3 , 7 , 2 ):
46
46
# typing.Ordereddict not added until py 3.7.2
47
- from collections import OrderedDict # type: ignore # until 3.6 dropped
48
- OrderedDict_OMD = OrderedDict # type: ignore # until 3.6 dropped
47
+ from collections import OrderedDict
48
+ OrderedDict_OMD = OrderedDict
49
49
else :
50
- from typing import OrderedDict # type: ignore # until 3.6 dropped
50
+ from typing import OrderedDict
51
51
OrderedDict_OMD = OrderedDict [str , List [T_OMD_value ]] # type: ignore[assignment, misc]
52
52
53
53
# -------------------------------------------------------------
@@ -177,7 +177,7 @@ def __exit__(self, exception_type: str, exception_value: str, traceback: str) ->
177
177
class _OMD (OrderedDict_OMD ):
178
178
"""Ordered multi-dict."""
179
179
180
- def __setitem__ (self , key : str , value : _T ) -> None : # type: ignore[override]
180
+ def __setitem__ (self , key : str , value : _T ) -> None :
181
181
super (_OMD , self ).__setitem__ (key , [value ])
182
182
183
183
def add (self , key : str , value : Any ) -> None :
@@ -203,8 +203,8 @@ def setlast(self, key: str, value: Any) -> None:
203
203
prior = super (_OMD , self ).__getitem__ (key )
204
204
prior [- 1 ] = value
205
205
206
- def get (self , key : str , default : Union [_T , None ] = None ) -> Union [_T , None ]: # type: ignore
207
- return super (_OMD , self ).get (key , [default ])[- 1 ] # type: ignore
206
+ def get (self , key : str , default : Union [_T , None ] = None ) -> Union [_T , None ]:
207
+ return super (_OMD , self ).get (key , [default ])[- 1 ]
208
208
209
209
def getall (self , key : str ) -> List [_T ]:
210
210
return super (_OMD , self ).__getitem__ (key )
@@ -299,9 +299,9 @@ def __init__(self, file_or_files: Union[None, PathLike, 'BytesIO', Sequence[Unio
299
299
:param repo: Reference to repository to use if [includeIf] sections are found in configuration files.
300
300
301
301
"""
302
- cp .RawConfigParser .__init__ (self , dict_type = _OMD ) # type: ignore[arg-type]
302
+ cp .RawConfigParser .__init__ (self , dict_type = _OMD )
303
303
self ._dict : Callable [..., _OMD ] # type: ignore[assignment] # mypy/typeshed bug
304
- self ._defaults : _OMD # type: ignore[assignment] # mypy/typeshed bug
304
+ self ._defaults : _OMD
305
305
self ._sections : _OMD # type: ignore[assignment] # mypy/typeshed bug
306
306
307
307
# Used in python 3, needs to stay in sync with sections for underlying implementation to work
0 commit comments