-
Notifications
You must be signed in to change notification settings - Fork 278
ADR0005: Decide on python code style guide #1232
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
Conversation
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.
This looks good, thanks @lukpueh. I pointed out a couple of minor nits, but I'm OK with the ADR as is.
(Apologies for being nit-picky about English.)
Good idea. Could we also use pylint, flake8, and black? |
Thanks for the comments, you two! No need to apologize, @joshuagl, I do appreciate language corrections, and our style guide actually encourages them. |
Use Google style guide with refinements, because the Google style guide is a comprehensive, well-established style guide that is mostly based on PEP-8 and was accepted by everyone on the TUF team. There is no need to replicate these recommendations. However, we do provide a very slim document with additional refinements, in order to emphasize on items the we consider especially important, want to be handled differently, or in one specific way, where the Google guide would allow multiple. Signed-off-by: Lukas Puehringer <[email protected]> Co-authored-by: Joshua Lock <[email protected]>
Similar instructions are in the style guide preamble, but we repeat it here for emphasis. Signed-off-by: Lukas Puehringer <[email protected]>
@joshuagl, I squashed your suggestions into my commit. @trishankatdatadog, I added another commit to mention linters and formatters and general style guide usage/transition instructions. Would either of you mind taking another look? Thanks! |
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.
💯
Hmm, I do have some reservations regarding hanging vs aligned indents in function arguments, but whatever, I can live with it. |
What do you mean? Our new guide specifically favors aligned indent, which is what you seemed very passionate above. |
My bad, I missed the tweak to the Google guide. Keep calm and carry on 💯 💯 |
Ensure that the newly added files' docstrings adhere to the recently adopted code style guideline (theupdateframework#1232). Small code style improvements in comments and imports. Signed-off-by: Teodora Sechkova <[email protected]>
Ensure that the newly added files' docstrings adhere to the recently adopted code style guideline (theupdateframework#1232). Small code style improvements in comments and imports. Signed-off-by: Teodora Sechkova <[email protected]>
Ensure that the newly added files' docstrings adhere to the recently adopted code style guideline (theupdateframework#1232). Small code style improvements in comments and imports. Signed-off-by: Teodora Sechkova <[email protected]>
Fixes #1128
Description of the changes being introduced by the pull request:
Document why we chose to henceforth use the Google Python style guide with minimal refinements.
Please verify and check that the pull request fulfills the following
requirements: