Skip to content

Commit 4d11721

Browse files
pre-commit-ci[bot]sejalpunwatkar
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 55f674d commit 4d11721

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/hdmf/validate/errors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ class ValidationWarning(Error):
220220
"""Base class for validation warnings."""
221221
@property
222222
def message(self):
223-
return self.reason
223+
return self.reason
224224

225225
class ExtraFieldWarning(ValidationWarning):
226226
"""Warning for fields found in data but not defined in any applicable spec."""
227-
pass
227+
pass

src/hdmf/validate/validator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ def __validate_children(self, parent_builder):
639639
if self.spec.data_type is not None:
640640
for extra_builder in matcher.unmatched_builders:
641641
if extra_builder.name in ( 'quux', 'qux', 'quz', 'baz', 'bar', 'x', 'y', 'meaning', 'value', 'dtr', 'target'):
642-
continue
642+
continue
643643
if extra_builder.name in extra_elements:
644644
continue
645645
yield ValidationWarning(
@@ -703,7 +703,7 @@ def __validate_child_builder(self, child_spec, child_builder, parent_builder):
703703
yield self.__construct_illegal_link_error(child_spec, parent_builder)
704704
return # do not validate illegally linked objects
705705
child_builder = child_builder.builder
706-
706+
707707
child_builder_data_type = child_builder.attributes.get(self.spec.type_key())
708708
validators = list(self.__get_child_validators(child_spec, child_builder_data_type))
709709

tests/unit/validator_tests/test_validate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,7 +2078,7 @@ def getSpecs(self):
20782078
]
20792079
),
20802080
)
2081-
2081+
20822082
def test_attribute_intersection_no_warning(self):
20832083
"""Test that 'resolution' triggers NO warning because ext_spec knows it."""
20842084
dataset = DatasetBuilder(
@@ -2129,4 +2129,4 @@ def test_unexpected_element_warning(self):
21292129

21302130
warnings = [r for r in result if isinstance(r, ValidationWarning) and "Unexpected element" in str(r)]
21312131
self.assertEqual(len(warnings), 1)
2132-
self.assertIn("extra_ds", str(warnings))
2132+
self.assertIn("extra_ds", str(warnings))

0 commit comments

Comments
 (0)