Skip to content

Commit

Permalink
Revert "Defined recursive GeometryTree Comments function for nested d…
Browse files Browse the repository at this point in the history
…icts."

This reverts commit d0f5f9d.

-This was a hacky workaround for the real problem that was just solved
  • Loading branch information
MicahGale committed Feb 4, 2024
1 parent 3bcfbef commit 4246f30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion montepy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from montepy.universe import Universe
import sys

__version__ = "0.2.5"
__version__ = "0.2.6dev1"

# enable deprecated warnings for users
if not sys.warnoptions:
Expand Down
15 changes: 2 additions & 13 deletions montepy/input_parser/syntax_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,19 +242,8 @@ def format(self):

@property
def comments(self):
for key, node in self.nodes.items():
if isinstance(node, SyntaxNodeBase):
yield from node.comments
elif isinstance(node, dict):
yield from GeometryTree._recurse_comments(node)

@staticmethod
def _recurse_comments(tree):
for node in tree.values():
if isinstance(node, SyntaxNodeBase):
yield from node.comments
elif isinstance(node, dict):
yield from GeometryTree._recurse_comments(node)
for node in self.nodes.values():
yield from node.comments

@property
def left(self):
Expand Down

0 comments on commit 4246f30

Please sign in to comment.