pylint: enable pylint#13
Merged
Merged
Conversation
Pylint reports were previously disabled. Enable them now. Signed-off-by: Ales Novak <alnovak@suse.com> Signed-off-by: Daniel Wagner <wagi@kernel.org>
f-strings are preferred for string formatting. Resolves pylin complaint C0209. Signed-off-by: Ales Novak <alnovak@suse.com> Signed-off-by: Daniel Wagner <wagi@kernel.org>
Resolves pylint complaints C0114 C0115, C0116. Signed-off-by: Ales Novak <alnovak@suse.com> Signed-off-by: Daniel Wagner <wagi@kernel.org>
We should not assume that the locale is UTF-8, set it explicitely. Resolves pylint complaint W1514. Signed-off-by: Ales Novak <alnovak@suse.com> Signed-off-by: Daniel Wagner <wagi@kernel.org>
Python3 changed the default arguments of super(), switch to that. Resolves python complaint R1725. Signed-off-by: Ales Novak <alnovak@suse.com> Signed-off-by: Daniel Wagner <wagi@kernel.org>
assertTrue(False, ...) is redundant, replace it with fail. Resolves pylint complaint W1503. Signed-off-by: Ales Novak <alnovak@suse.com> Signed-off-by: Daniel Wagner <wagi@kernel.org>
Re-raise exceptions with "from" so that the original exception is preserved. Resolves pylint complaint W0707. Signed-off-by: Ales Novak <alnovak@suse.com> Signed-off-by: Daniel Wagner <wagi@kernel.org>
Unused function/method arguments should be masked with _. Resolves pylint complaint W0613. Signed-off-by: Ales Novak <alnovak@suse.com> Signed-off-by: Daniel Wagner <wagi@kernel.org>
- standard imports should be placed first (resolves pylint C0411) - import on toplevel only (resolves pylint C0415) - import X.Y as Y should be rephrased to from X import Y (resolves pylint R0402) Signed-off-by: Ales Novak <alnovak@suse.com> Signed-off-by: Daniel Wagner <wagi@kernel.org>
- import on toplevel only (resolves pylint C0415) - linearize the processing Signed-off-by: Ales Novak <alnovak@suse.com> Signed-off-by: Daniel Wagner <wagi@kernel.org>
- optimize if-else and returns (resolves pylint R1705) - removal of stray passes (resolves pylint W0107) - pythonic way of creating dict (resolves pylint R1735) - removal of unecessary argument Port.setup#root - fix shadowing by UIPassthruNode.ui_command_clear_ids#clear (resolves pylint W0621) Signed-off-by: Ales Novak <alnovak@suse.com> Signed-off-by: Daniel Wagner <wagi@kernel.org>
Resolves pylint complaint W0718. Signed-off-by: Ales Novak <alnovak@suse.com> Signed-off-by: Daniel Wagner <wagi@kernel.org>
- there's no way around getting configshell _exit value (masks pylint W0212) - we're not going to reorganize nvmet.nvme into several modules at this point (masks pylint C0302) Signed-off-by: Ales Novak <alnovak@suse.com> Signed-off-by: Daniel Wagner <wagi@kernel.org>
Contributor
|
added my SoB and updated the commit message slightly. |
Contributor
|
Thanks a lot! |
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.
Let's enable pylint checks to ensure better quality of code.