Skip to content

pylint: enable pylint#13

Merged
igaw merged 13 commits into
linux-nvme:masterfrom
alesax:enable-pylint
Jul 14, 2026
Merged

pylint: enable pylint#13
igaw merged 13 commits into
linux-nvme:masterfrom
alesax:enable-pylint

Conversation

@alesax

@alesax alesax commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Let's enable pylint checks to ensure better quality of code.

alesax and others added 13 commits July 14, 2026 15:03
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>
@igaw

igaw commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

added my SoB and updated the commit message slightly.

@igaw
igaw merged commit 06d4ac1 into linux-nvme:master Jul 14, 2026
6 checks passed
@igaw

igaw commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants