Fix: run checks on the updated headline_hierarchy.
Some checks reported warnings
Testing / pytest (push) Has been cancelled
Testing / mypy (push) Has been cancelled
Testing / stability-extra-test (push) Has been cancelled

This commit is contained in:
Sergio Martínez Portela 2023-10-16 23:16:41 +02:00
parent 1f54307fdb
commit e4821f02cd

View File

@ -2104,8 +2104,8 @@ class OrgDocReader:
headline_hierarchy.append(headline) headline_hierarchy.append(headline)
if all([hl is not None for hl in headline_hierarchy]): if all([hl is not None for hl in headline_hierarchy]):
if not ([ len(hl['orig'].group('stars')) for hl in self.headline_hierarchy ] if not ([ len(hl['orig'].group('stars')) for hl in headline_hierarchy ]
== list(range(1, len(self.headline_hierarchy) + 1))): == list(range(1, len(headline_hierarchy) + 1))):
raise AssertionError('Error on Headline Hierarchy') raise AssertionError('Error on Headline Hierarchy')
else: else:
raise AssertionError('None found on headline hierarchy') raise AssertionError('None found on headline hierarchy')