@@ -142,7 +142,7 @@ class Flags:
142142 EXPLICIT_NEST = 1
143143
144144 def __init__ (self ) -> None :
145- self ._flags : dict [str , dict ] = {}
145+ self ._flags : dict [str , dict [ Any , Any ] ] = {}
146146 self ._pending_flags : set [tuple [Key , int ]] = set ()
147147
148148 def add_pending (self , key : Key , flag : int ) -> None :
@@ -200,7 +200,7 @@ def get_or_create_nest(
200200 key : Key ,
201201 * ,
202202 access_lists : bool = True ,
203- ) -> dict :
203+ ) -> dict [ str , Any ] :
204204 cont : Any = self .dict
205205 for k in key :
206206 if k not in cont :
@@ -210,7 +210,7 @@ def get_or_create_nest(
210210 cont = cont [- 1 ]
211211 if not isinstance (cont , dict ):
212212 raise KeyError ("There is no nest behind this key" )
213- return cont
213+ return cont # type: ignore[no-any-return]
214214
215215 def append_nest_to_list (self , key : Key ) -> None :
216216 cont = self .get_or_create_nest (key [:- 1 ])
@@ -409,9 +409,9 @@ def parse_one_line_basic_str(src: str, pos: Pos) -> tuple[Pos, str]:
409409 return parse_basic_str (src , pos , multiline = False )
410410
411411
412- def parse_array (src : str , pos : Pos , parse_float : ParseFloat ) -> tuple [Pos , list ]:
412+ def parse_array (src : str , pos : Pos , parse_float : ParseFloat ) -> tuple [Pos , list [ Any ] ]:
413413 pos += 1
414- array : list = []
414+ array : list [ Any ] = []
415415
416416 pos = skip_comments_and_array_ws (src , pos )
417417 if src .startswith ("]" , pos ):
@@ -433,7 +433,7 @@ def parse_array(src: str, pos: Pos, parse_float: ParseFloat) -> tuple[Pos, list]
433433 return pos + 1 , array
434434
435435
436- def parse_inline_table (src : str , pos : Pos , parse_float : ParseFloat ) -> tuple [Pos , dict ]:
436+ def parse_inline_table (src : str , pos : Pos , parse_float : ParseFloat ) -> tuple [Pos , dict [ str , Any ] ]:
437437 pos += 1
438438 nested_dict = NestedDict ()
439439 flags = Flags ()
@@ -679,7 +679,7 @@ def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat:
679679 instead of returning illegal types.
680680 """
681681 # The default `float` callable never returns illegal types. Optimize it.
682- if parse_float is float : # type: ignore[comparison-overlap]
682+ if parse_float is float :
683683 return float
684684
685685 def safe_parse_float (float_str : str ) -> Any :
0 commit comments