Skip to content

Commit d3ca678

Browse files
committed
Addressed finding 1 of issue hed-standard#1240 debug print statements
1 parent 87e08dd commit d3ca678

4 files changed

Lines changed: 0 additions & 42 deletions

File tree

hed/schema/hed_schema.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -446,39 +446,16 @@ def __eq__(self, other):
446446
if other is None:
447447
return False
448448
if self.get_save_header_attributes() != other.get_save_header_attributes():
449-
# print(f"Header attributes not equal: '{self.get_save_header_attributes()}' vs '{other.get_save_header_attributes()}'")
450449
return False
451450
if self.has_duplicates() != other.has_duplicates():
452-
# print(f"Duplicates: '{self.has_duplicates()}' vs '{other.has_duplicates()}'")
453451
return False
454452
if self.prologue.strip() != other.prologue.strip():
455-
# print(f"PROLOGUE NOT EQUAL: '{self.prologue.strip()}' vs '{other.prologue.strip()}'")
456453
return False
457454
if self.epilogue.strip() != other.epilogue.strip():
458-
# print(f"EPILOGUE NOT EQUAL: '{self.epilogue.strip()}' vs '{other.epilogue.strip()}'")
459455
return False
460456
if self._sections != other._sections:
461-
# This block is useful for debugging when modifying the schema class itself.
462-
# for section1, section2 in zip(self._sections.values(), other._sections.values()):
463-
# if section1 != section2:
464-
# dict1 = section1.all_names
465-
# dict2 = section2.all_names
466-
# if dict1 != dict2:
467-
# print(f"DICT {section1._section_key} NOT EQUAL")
468-
# key_union = set(list(dict1.keys()) + list(dict2.keys()))
469-
# for key in key_union:
470-
# if key not in dict1:
471-
# print(f"{key} not in dict1")
472-
# continue
473-
# if key not in dict2:
474-
# print(f"{key} not in dict2")
475-
# continue
476-
# if dict1[key] != dict2[key]:
477-
# s = f"{key} unmatched: '{str(dict1[key].name)}' vs '{str(dict2[key].name)}'"
478-
# print(s)
479457
return False
480458
if self._namespace != other._namespace:
481-
# print(f"NAMESPACE NOT EQUAL: '{self._namespace}' vs '{other._namespace}'")
482459
return False
483460
return True
484461

hed/schema/hed_schema_entry.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ def _set_attribute_value(self, attribute, attribute_value):
104104
# todo: remove this patch and redo the code
105105
# This check doesn't need to be done if the schema is valid.
106106
if attribute not in self._section.valid_attributes:
107-
# print(f"Unknown attribute {attribute}")
108107
if self._unknown_attributes is None:
109108
self._unknown_attributes = {}
110109
self._unknown_attributes[attribute] = attribute_value

hed/validator/reserved_checker.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,3 @@ def get_incompatible(self, tag, reserved_tags) -> list:
177177
return incompatible
178178

179179
# Additional methods for other checks should be implemented here following similar patterns.
180-
181-
182-
if __name__ == "__main__":
183-
checker = ReservedChecker.get_instance()
184-
print("ReservedChecker initialized successfully.")
185-
print(checker.special_names)

hed/validator/util/char_util.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,3 @@ def _get_rex_dict():
221221
json_path = os.path.realpath(os.path.join(current_dir, CLASS_REX_FILENAME))
222222
with open(json_path, "r", encoding="utf-8") as f:
223223
return json.load(f)
224-
225-
226-
if __name__ == "__main__":
227-
# Example input string
228-
input_string = "Hello World123"
229-
230-
# Class name (e.g., "nameClass" or "testClass")
231-
class_name = "nameClass"
232-
233-
# Call the function and print the result
234-
# problem_indices = get_problem_chars(input_string, class_name, json_data)
235-
# print(problem_indices)

0 commit comments

Comments
 (0)