-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented clear for material #668
base: alpha-test-dev
Are you sure you want to change the base?
Conversation
I don't like that this is 92% patch coverage. |
if not hasattr(p, "even_number_sequence"): | ||
sequence = syntax_node.ListNode("number sequence") | ||
if type(p[0]) == syntax_node.ListNode: | ||
return p[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pathway not tested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Part of this path is only used with a shortcut phrase. I'm not sure if this is worth testing.
Need to still fix #667. |
Pull Request Checklist for MontePy
Description
This implements
clear
forMaterial
. This also fixes a bug where sometimes you would get garbled materials likem1 1001.80c 0.68016.80c 0.3
. This is due to the last edge leaf of the syntax tree having no space or no padding. This fixes this by every time a nuclide or default library is added it checks if there is an existing space, and if not it adds a new line (and the requisite spaces).Fixes #665, fixes #667, fixes #666.
General Checklist
black
version 25.Documentation Checklist
Additional Notes for Reviewers
Ensure that:
📚 Documentation preview 📚: https://montepy--668.org.readthedocs.build/en/668/