Skip to content

Commit

Permalink
fix: Update register hook
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisjared committed Feb 13, 2023
1 parent 95f59df commit 560a863
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/spaemis/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ class DownscalingScenarioConfig:
default_scaler: Optional[ScalerMethod] = None


converter.register_structure_hook(
List[VariableScalerConfig], _convert_filename_to_scalers
# Ideally we could use converter.register_structure_hook. See
# https://github.com/python-attrs/cattrs/issues/206#issuecomment-1013714386
converter.register_structure_hook_func(
lambda t: t == List[VariableScalerConfig], _convert_filename_to_scalers
)


Expand Down

0 comments on commit 560a863

Please sign in to comment.