tuf/api: Expose tuf.api as a package (take 2)#1177
Merged
lukpueh merged 9 commits intotheupdateframework:developfrom Oct 15, 2020
Merged
tuf/api: Expose tuf.api as a package (take 2)#1177lukpueh merged 9 commits intotheupdateframework:developfrom
lukpueh merged 9 commits intotheupdateframework:developfrom
Conversation
1 task
lukpueh
reviewed
Oct 15, 2020
Signed-off-by: William Woodruff <william@trailofbits.com>
Add a minimal pylintrc to lint for new code being developed in tuf/api and update the tox configuration to ignore tuf/api with the default pylintrc and run an extra invocation of pylint for just the modules in tuf/api. Signed-off-by: Joshua Lock <jlock@vmware.com>
The logging module is not used in metadata, therefore remove it Signed-off-by: Joshua Lock <jlock@vmware.com>
A single letter variable name of 'f' causes pylint to throw a coding style convention warning: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) Signed-off-by: Joshua Lock <jlock@vmware.com>
Using an else after a raise results in a refactor message from pylint: R1720: Unnecessary "elif" after "raise" (no-else-raise) This is because the raise will exit the block, and pylint suggests that explicit if's, rather than an if-elif-else, are clearer style. Update the style of Metadata.verify() to match pylint expectations. Signed-off-by: Joshua Lock <jlock@vmware.com>
The Targets constructor takes seven arguments, which violates pylints default value of five for max-arguments: R0913: Too many arguments (7/5) (too-many-arguments) As this feels like a coding style decision that should be made and documented disable that test for only the Targets constructor until a coding style decision has been made and documented as a decision record. Signed-off-by: Joshua Lock <jlock@vmware.com>
We don't need to lint the code with every version of Python, instead add an extra tox env which lints once with the latest supported Python version Signed-off-by: Joshua Lock <jlock@vmware.com>
Signed-off-by: Joshua Lock <jlock@vmware.com>
6508746 to
a4d851d
Compare
Member
Author
|
I've force pushed an update to squash fixups, which prevents the DCO from complaining. You can see the pre rebase history here develop...joshuagl:ww/tuf-api-package-hist where I've added 81e0ef6 to add the lint env to travis, and move bandit into the lint env. I also changed 427759b while I was in the .travis.yml to use newer Python for with-sslib-master |
Contributor
|
Thanks @joshuagl! |
Authored-by: Lukas Puehringer <lukas.puehringer@nyu.edu> Signed-off-by: Joshua Lock <jlock@vmware.com>
ab554ab to
54963c4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Taking over from #1157
Description of the changes being introduced by the pull request:
Note: ac8d273 disables a single pylintrc check in a code comment. I was loath to do this, but I think it's better to explicitly disable that site than disable the message for all code before we've decided on coding style.
Please verify and check that the pull request fulfills the following
requirements: