|
15 | 15 | from cc_plugin_cc6 import __version__ |
16 | 16 |
|
17 | 17 | from ._constants import deltdic |
18 | | -from .utils import match_pattern_or_string, to_str |
| 18 | +from .utils import match_pattern_or_string, sanitize, to_str |
19 | 19 |
|
20 | 20 | get_tseconds = lambda t: t.total_seconds() # noqa |
21 | 21 | get_tseconds_vector = np.vectorize(get_tseconds) |
@@ -484,17 +484,19 @@ def _write_consistency_output(self): |
484 | 484 | # Write combined dictionary |
485 | 485 | with open(self.consistency_output, "w") as f: |
486 | 486 | json.dump( |
487 | | - { |
488 | | - "global_attributes": file_attrs_req, |
489 | | - "global_attributes_non_required": file_attrs_nreq, |
490 | | - "global_attributes_dtypes": file_attrs_dtypes, |
491 | | - "variable_attributes": var_attrs, |
492 | | - "variable_attributes_dtypes": var_attrs_dtypes, |
493 | | - "variable_dtypes": var_dtypes, |
494 | | - "dimensions": dims, |
495 | | - "coordinates": coord_checksums, |
496 | | - "time_info": time_info, |
497 | | - }, |
| 487 | + sanitize( |
| 488 | + { |
| 489 | + "global_attributes": file_attrs_req, |
| 490 | + "global_attributes_non_required": file_attrs_nreq, |
| 491 | + "global_attributes_dtypes": file_attrs_dtypes, |
| 492 | + "variable_attributes": var_attrs, |
| 493 | + "variable_attributes_dtypes": var_attrs_dtypes, |
| 494 | + "variable_dtypes": var_dtypes, |
| 495 | + "dimensions": dims, |
| 496 | + "coordinates": coord_checksums, |
| 497 | + "time_info": time_info, |
| 498 | + } |
| 499 | + ), |
498 | 500 | f, |
499 | 501 | indent=4, |
500 | 502 | ) |
|
0 commit comments