-
Notifications
You must be signed in to change notification settings - Fork 18
Fixed surfaces cant be unset from is reflecting #710
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
Fixed surfaces cant be unset from is reflecting #710
Conversation
|
The new output looks like |
|
That sounds fine: it preserves the transformed surface card's alignment. I will test a case where the line contains 4 leading space to verify that this doesn't incorrectly change it into a continuation line. |
tjlaboss
left a comment
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.
As it turns out, disabling is_reflecting or is_white_boundary on a line with 4 leading spaces does give it a fifth.
So question do we:
the second seems a lot easier. |
|
Priority 1 (make it right) is higher than priority 4 (make it pretty). So do option 2, and if if it's ugly, turn that into a separate issue. |
Pull Request Checklist for MontePy
Description
This is a quick fix for the case where
is_reflecting=Falsedid nothing on output. This is because the syntax tree was only updated iffis_reflecting ^ is_white_boundaryis True. This was a quick fix by giving a finalelse.You know in rust had I done something like:
The compiler would have complained. (Ignore the fact it would have been happy with:
)
Update
*1...becomes1.... This is because even withnever_padthe minimum value length of the node is passed to the string formatter. This was solved by:value_lengthfornever_padmodifiernode is retroactively created for+1numbers wherenever_pad=Falsenever_padargumentto_generate_default_node`Fixes #709
Also before you look a few lines down in the code see #711.
General Checklist
blackversion 25.Documentation Checklist
First-Time Contributor Checklist
pyproject.tomlif you wish to do so.Additional Notes for Reviewers
Ensure that:
📚 Documentation preview 📚: https://montepy--710.org.readthedocs.build/en/710/