Files
anders 16c54c6653 Tilføjet venv med docling og afhængigheder
Testfiler opdelt i PNG og previews
2026-10-27 12:20:23 +01:00

9 lines
353 B
Python

def is_attribute_overridden(base: type, cls: type, attribute_name: str) -> bool:
"""Return True if attribute is overridden by any ancestor before reaching base in the MRO."""
for ancestor in cls.mro():
if ancestor is base:
return False
if attribute_name in ancestor.__dict__:
return True
return False