Skip to content

Commit

Permalink
add no-op finalize stub in KeywordTreeParser
Browse files Browse the repository at this point in the history
  • Loading branch information
freyso committed Dec 11, 2023
1 parent d7244bf commit ba083f9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pyiron_atomistics/sphinx/parser_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,15 @@ def parse(self, filename):
except StopIteration:
break
self._cleanup(self.keylevels[0])
if hasattr(self, "finalize"):
self.finalize()
# call optional finalize routine
self.finalize()
close(filehandle)
# clean up object properties that only exist during parsing
del (self.filename, self.line, self.lineno, self.line_from, self.lineview)

def finalize(self):
pass

def location(self):
"""Return the current parsing location (for error messages)"""
return f"in file '{self.filename}' line" + (
Expand Down

0 comments on commit ba083f9

Please sign in to comment.