Skip to content
Snippets Groups Projects

Loosen checks on numeric values

Merged Thibault Lavigne requested to merge loosen-checks-on-numeric-values into master
1 file
+ 3
4
Compare changes
  • Side-by-side
  • Inline
@@ -152,10 +152,9 @@ class MetaDataMixin(object):
metadata.get("name"), str
), "name shouldn't be null and should be of type str"
value = metadata.get("value")
assert value is not None and isinstance(
value, (str, float, int) and 0 <= value <= 1
), "value shouldn't be null and should be of type (str or float or int) in [0..1] range"
assert metadata.get("value") is not None and isinstance(
metadata.get("value"), (str, float, int)
), "value shouldn't be null and should be of type (str or float or int)"
assert metadata.get("entity_id") is None or isinstance(
metadata.get("entity_id"), str
Loading