@@ -214,7 +214,7 @@ class Flags:
214214 EXPLICIT_NEST = 1
215215
216216 def __init__ (self ) -> None :
217- self ._flags : dict [str , dict ] = {}
217+ self ._flags : dict [str , dict [ Any , Any ] ] = {}
218218 self ._pending_flags : set [tuple [Key , int ]] = set ()
219219
220220 def add_pending (self , key : Key , flag : int ) -> None :
@@ -272,8 +272,8 @@ def get_or_create_nest(
272272 key : Key ,
273273 * ,
274274 access_lists : bool = True ,
275- ) -> dict :
276- cont : Any = self .dict
275+ ) -> dict [ str , Any ] :
276+ cont = self .dict
277277 for k in key :
278278 if k not in cont :
279279 cont [k ] = {}
@@ -486,9 +486,9 @@ def parse_one_line_basic_str(src: str, pos: Pos) -> tuple[Pos, str]:
486486 return parse_basic_str (src , pos , multiline = False )
487487
488488
489- def parse_array (src : str , pos : Pos , parse_float : ParseFloat ) -> tuple [Pos , list ]:
489+ def parse_array (src : str , pos : Pos , parse_float : ParseFloat ) -> tuple [Pos , list [ Any ] ]:
490490 pos += 1
491- array : list = []
491+ array : list [ Any ] = []
492492
493493 pos = skip_comments_and_array_ws (src , pos )
494494 if src .startswith ("]" , pos ):
@@ -510,7 +510,7 @@ def parse_array(src: str, pos: Pos, parse_float: ParseFloat) -> tuple[Pos, list]
510510 return pos + 1 , array
511511
512512
513- def parse_inline_table (src : str , pos : Pos , parse_float : ParseFloat ) -> tuple [Pos , dict ]:
513+ def parse_inline_table (src : str , pos : Pos , parse_float : ParseFloat ) -> tuple [Pos , dict [ str , Any ] ]:
514514 pos += 1
515515 nested_dict = NestedDict ()
516516 flags = Flags ()
@@ -741,7 +741,7 @@ def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat:
741741 instead of returning illegal types.
742742 """
743743 # The default `float` callable never returns illegal types. Optimize it.
744- if parse_float is float : # type: ignore[comparison-overlap]
744+ if parse_float is float :
745745 return float
746746
747747 def safe_parse_float (float_str : str ) -> Any :
0 commit comments