-
Notifications
You must be signed in to change notification settings - Fork 30
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
Update formatting for source and header files #130
Conversation
Signed-off-by: ilya.kuksenok <[email protected]>
Signed-off-by: ilya.kuksenok <[email protected]>
Signed-off-by: ilya.kuksenok <[email protected]>
Signed-off-by: ilya.kuksenok <[email protected]>
@giuseppe could you review this pr? |
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.
I have no clue about write
vs append
in python. @Ilya-source does it creates a significant difference ?
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.
PR LGTM overall apart from the one doubt above.
@Ilya-source thanks for opening the PR, could you please open a PR for crun that uses this version of libocispec to see if there are any regressions? |
actually we don't need that, I've verified the generated source is the same |
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.
LGTM
That makes code a bit easier to debug in python debugger, and this is faster, of course, in this project this was not that important, because this is just a one time generation step, but still. :) |
@Ilya-source Thanks for the info and the PR :) |
Hello!
I want to introduce some updates to string handling: move from %s formatting to f-string.
That makes the code a bit more readable and faster.
Also, I changed how source and header files are written (basically, I just moved to the
writelines
method).I hope you will find those changes useful.