-
Notifications
You must be signed in to change notification settings - Fork 50
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
Can't set indentation when patching #79
Comments
I'm confused about this comment, because Can you show me what you're trying to do, and why you want to use |
With patch you can also add new keys, and for those it uses the default indentation. |
Right, thanks, that makes sense. Hopefully not too difficult to implement. |
I've added a patch which adds this feature. It should be added at the top (namelists) level:
Hopefully this should work for you. I experimented a bit with also permitting it at the group level, but it wasn't clear how to fallback to the namelist level if unset. (Note: #81 would presumably address this, but not yet sure if it's worth implementing this idea.) |
Looks good! What happens if I include |
I haven't checked, but fairly sure it will create an empty group named In any case, I probably ought to do another pypi update soon, though it would be good to at least have a crack at the current outstanding issues around patching :). |
Actually, it seems it won't have any effect in older versions, since (as mentioned in #80) new content is simply ignored by |
The indentation option can currently only be set when constructing a
Namelist
object. However, for the case when you want to patch a file, then there's no way to set theindent
option to be used for the ouput patch file.The text was updated successfully, but these errors were encountered: