@@ -21,9 +21,10 @@ def to_snake_recursive(
2121 return struct
2222
2323
24- def fix_lists (struct : dict [ str , Any ] | list [ Any ] ) -> dict [ str , Any ] | list [ Any ] :
25- fixed = {}
24+ def fix_lists (struct : Any ) -> Any :
25+ fixed : Any
2626 if isinstance (struct , dict ):
27+ fixed = {}
2728 for k , v in struct .items ():
2829 if k == "@count" :
2930 continue
@@ -34,7 +35,6 @@ def fix_lists(struct: dict[str, Any] | list[Any]) -> dict[str, Any] | list[Any]:
3435 fixed [k ] = fix_lists (fix_lists (struct [k ]))
3536 else :
3637 fixed [k ] = fix_lists (struct [k ])
37-
3838 elif isinstance (struct , list ):
3939 fixed = [fix_lists (v ) for v in struct ]
4040 else :
@@ -43,7 +43,7 @@ def fix_lists(struct: dict[str, Any] | list[Any]) -> dict[str, Any] | list[Any]:
4343
4444
4545def filter_metadata_dict (image_information : dict [str , Any ]) -> dict [str , Any ]:
46- image_information = to_snake_recursive (image_information )
46+ image_information = to_snake_recursive (image_information ) # type: ignore
4747 image_information = fix_lists (image_information )
4848 return image_information
4949
@@ -53,10 +53,10 @@ def build_azimuth_fm_rate_list(
5353) -> list [dict [str , Any ] | list [Any ]]:
5454 azimuth_fm_rate_list_out : list [dict [str , Any ] | list [Any ]] = []
5555 for item in azimuth_fm_rate_list :
56- azimuth_fm_rate_polynomial_str = item ["azimuth_fm_rate_polynomial" ]["$" ]
56+ azimuth_fm_rate_polynomial_str = item ["azimuth_fm_rate_polynomial" ]["$" ] # type: ignore
5757 azimuth_fm_rate_list_out .append (
5858 {
59- "azimuth_time" : item ["azimuth_time" ],
59+ "azimuth_time" : item ["azimuth_time" ], # type: ignore
6060 "azimuth_fm_rate_polynomial" : np .fromstring (
6161 azimuth_fm_rate_polynomial_str , sep = " "
6262 ).tolist (),
0 commit comments