@@ -56,10 +56,10 @@ def normalize(
5656 bool_ok : bool = True ,
5757) -> Data | StandaloneData | SubDict :
5858 if isinstance (data , Mapping ):
59- items = ((normalize (k , bool_ok = False ), normalize (v )) for k , v in data .items ()) # type: ignore [arg-type, misc]
59+ items = ((normalize (k , bool_ok = False ), normalize (v )) for k , v in data .items ())
6060 if keywords is None :
61- return as_dict_check_unique (items ) # type: ignore [arg-type]
62- ret1 : SubDict = MultiDict (items ) # type: ignore [arg-type]
61+ return as_dict_check_unique (items )
62+ ret1 : SubDict = MultiDict (items )
6363 seen = set ()
6464 for k , v in ret1 .items ():
6565 if k .startswith ("#" ):
@@ -112,7 +112,7 @@ def normalize(
112112 if arr .ndim == 1 or (arr .ndim == 2 and arr .shape [1 ] in (3 , 6 , 9 )):
113113 return arr
114114
115- return [normalize (d ) for d in data ] # type: ignore [arg-type, return-value]
115+ return [normalize (d ) for d in data ]
116116
117117 if isinstance (data , int ):
118118 return float (data )
@@ -122,7 +122,7 @@ def normalize(
122122 if isinstance (data , np .ndarray ):
123123 ret2 = data .tolist ()
124124 assert isinstance (ret2 , (int , float , list ))
125- return ret2 # type: ignore [return-value]
125+ return ret2
126126
127127 if (
128128 not isinstance (data , DimensionSet )
@@ -139,19 +139,19 @@ def normalize(
139139 if isinstance (k2 , Mapping ):
140140 msg = "Keyword in keyword entry cannot be a dictionary"
141141 raise ValueError (msg )
142- k2 = normalize (k2 , bool_ok = False ) # type: ignore [arg-type]
143- v2 = normalize (v2 ) # type: ignore [arg-type]
144- return (k2 , v2 ) # type: ignore [return-value]
142+ k2 = normalize (k2 , bool_ok = False )
143+ v2 = normalize (v2 )
144+ return (k2 , v2 )
145145
146146 if (
147147 is_sequence (data )
148148 and not isinstance (data , DimensionSet )
149149 and not isinstance (data , tuple )
150150 ):
151- return [normalize (d ) for d in data ] # type: ignore [arg-type, return-value]
151+ return [normalize (d ) for d in data ]
152152
153153 if isinstance (data , tuple ) and not isinstance (data , DimensionSet ):
154- return tuple (normalize (d , keywords = keywords ) for d in data ) # type: ignore [misc]
154+ return tuple (normalize (d , keywords = keywords ) for d in data )
155155
156156 if isinstance (data , str ):
157157 with contextlib .suppress (ValueError , KeyError ):
@@ -178,7 +178,7 @@ def dumps(
178178 header : SubDictLike | None = None ,
179179 tuple_is_keyword_entry : bool = False ,
180180) -> bytes :
181- data = normalize (data , keywords = keywords ) # type: ignore [arg-type, misc]
181+ data = normalize (data , keywords = keywords )
182182
183183 if isinstance (data , Mapping ):
184184 return (
@@ -287,7 +287,7 @@ def dumps(
287287
288288 if is_sequence (data ):
289289 return (
290- b"(" + b" " .join (dumps (v , tuple_is_keyword_entry = True ) for v in data ) + b")" # type: ignore [arg-type]
290+ b"(" + b" " .join (dumps (v , tuple_is_keyword_entry = True ) for v in data ) + b")"
291291 )
292292
293293 if data is True :
0 commit comments