Skip to content
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

MontePy adds unnecessary blank lines at the end of a file #523

Open
tjlaboss opened this issue Aug 28, 2024 · 3 comments
Open

MontePy adds unnecessary blank lines at the end of a file #523

tjlaboss opened this issue Aug 28, 2024 · 3 comments
Labels

Comments

@tjlaboss
Copy link
Collaborator

tjlaboss commented Aug 28, 2024

Is your feature request related to a problem? Please describe.
When writing out a file, MontePy adds 2 unnecessary blank line delimiters.

Describe the solution you'd like
Do not add newlines that are not present in the original file.

Describe alternatives you've considered
Always rstrip("\n"), but that would get rid of any that the user included and may want to keep.

Additional context

This is trivial, and mildly annoying at worst. If MontePy supports writing sections of the Cell, Surface, and Data blocks to other files for use with read file=..., however, it could introduce bugs.

The only other use case I can imagine where this would be relevant is if a user writes to a stream and then manually writes additional data cards after MontePy is done.

@MicahGale
Copy link
Collaborator

So at the very end of the file?

@tjlaboss
Copy link
Collaborator Author

Yes. This is very low priority.

@MicahGale
Copy link
Collaborator

Ok the phrasing was ambiguous, and wanted to clarify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants