From 26d02d3bcb6b29411cf2c9d37024cd0429a98cf7 Mon Sep 17 00:00:00 2001 From: IanCa Date: Wed, 25 Oct 2023 12:23:55 -0500 Subject: [PATCH] Allow HED in sidecar lists again --- hed/validator/sidecar_validator.py | 2 -- tests/validator/test_sidecar_validator.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/hed/validator/sidecar_validator.py b/hed/validator/sidecar_validator.py index 1db14a23..e0f33f8a 100644 --- a/hed/validator/sidecar_validator.py +++ b/hed/validator/sidecar_validator.py @@ -199,8 +199,6 @@ def _check_dict(key, data_dict): @staticmethod def _check_list(key, data_list): for sub_data in data_list: - if sub_data == key: - return True if SidecarValidator._check_for_key(key, sub_data): return True return False diff --git a/tests/validator/test_sidecar_validator.py b/tests/validator/test_sidecar_validator.py index 2c13897d..20a0cb7a 100644 --- a/tests/validator/test_sidecar_validator.py +++ b/tests/validator/test_sidecar_validator.py @@ -99,4 +99,4 @@ def test_bad_structure_HED_in_ignored(self): ''' sidecar = Sidecar(io.StringIO(sidecar_with_na_json)) issues = sidecar.validate(self.hed_schema) - self.assertEqual(len(issues), 3) \ No newline at end of file + self.assertEqual(len(issues), 2) \ No newline at end of file