Skip to content

Commit

Permalink
fix: apply to groups and datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
jokasimr committed Nov 5, 2024
1 parent 87c594e commit 755a2c1
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/chexus/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,7 @@ def __init__(self) -> None:
)

def applies_to(self, node: Dataset | Group) -> bool:
return (
isinstance(node, Dataset)
and is_transformation(node)
and "offset" in node.attrs
)
return is_transformation(node) and "offset" in node.attrs

def validate(self, node: Dataset | Group) -> Violation | None:
if "offset_units" not in node.attrs:
Expand All @@ -219,11 +215,7 @@ def __init__(self) -> None:
)

def applies_to(self, node: Dataset | Group) -> bool:
return (
isinstance(node, Dataset)
and is_transformation(node)
and "offset_units" in node.attrs
)
return is_transformation(node) and "offset_units" in node.attrs

def validate(self, node: Dataset | Group) -> Violation | None:
import scipp as sc
Expand Down

0 comments on commit 755a2c1

Please sign in to comment.