Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Ig-dolci committed Apr 18, 2024
1 parent fbd288e commit 280716f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ufl/utils/sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def canonicalize_metadata(metadata):
value = canonicalize_metadata(value)
elif isinstance(value, (int, float, str)) or value is None:
value = str(value)
elif hasattr(value, "ufl_signature"):
value = value.ufl_signature
else:
warnings.warn(f"Applying str() to a metadata value of type {type(value).__name__}, "
"don't know if this is safe.")
Expand Down

0 comments on commit 280716f

Please sign in to comment.