From: Nathan Chancellor <nathan@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nsc@kernel.org>,
Guillaume Tucker <gtucker@gtucker.io>
Cc: linux-kbuild@vger.kernel.org
Subject: [PATCH 1/3] scripts/container: Turn runtimes class variable into a tuple
Date: Thu, 22 Jan 2026 16:27:21 -0700 [thread overview]
Message-ID: <20260122-scripts-container-ruff-fixes-v1-1-fd1b928c3f10@kernel.org> (raw)
In-Reply-To: <20260122-scripts-container-ruff-fixes-v1-0-fd1b928c3f10@kernel.org>
'ruff check --select RUF scripts/container' warns:
RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
--> scripts/container:108:16
|
106 | """List of all supported runtimes"""
107 |
108 | runtimes = [PodmanRuntime, DockerRuntime]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
109 |
110 | @classmethod
|
runtimes is never modified so move from a list to a tuple, clearing up
the warning.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
scripts/container | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/container b/scripts/container
index b05333d8530b..dae475c6d262 100755
--- a/scripts/container
+++ b/scripts/container
@@ -105,7 +105,7 @@ class PodmanRuntime(CommonRuntime):
class Runtimes:
"""List of all supported runtimes"""
- runtimes = [PodmanRuntime, DockerRuntime]
+ runtimes = (PodmanRuntime, DockerRuntime)
@classmethod
def get_names(cls):
--
2.52.0
next prev parent reply other threads:[~2026-01-22 23:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 23:27 [PATCH 0/3] scripts/container: Minor fixups suggested by ruff Nathan Chancellor
2026-01-22 23:27 ` Nathan Chancellor [this message]
2026-01-23 20:34 ` [PATCH 1/3] scripts/container: Turn runtimes class variable into a tuple Guillaume Tucker
2026-01-22 23:27 ` [PATCH 2/3] scripts/container: Use list comprehension in get_names() Nathan Chancellor
2026-01-23 20:38 ` Guillaume Tucker
2026-01-22 23:27 ` [PATCH 3/3] scripts/container: Use iterable unpacking for _get_opts() Nathan Chancellor
2026-01-23 20:45 ` Guillaume Tucker
2026-01-23 15:14 ` [PATCH 0/3] scripts/container: Minor fixups suggested by ruff Miguel Ojeda
2026-01-23 21:01 ` Nathan Chancellor
2026-01-23 23:55 ` Miguel Ojeda
2026-01-23 20:26 ` Guillaume Tucker
2026-01-23 23:46 ` Nathan Chancellor
2026-02-04 8:54 ` Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260122-scripts-container-ruff-fixes-v1-1-fd1b928c3f10@kernel.org \
--to=nathan@kernel.org \
--cc=gtucker@gtucker.io \
--cc=linux-kbuild@vger.kernel.org \
--cc=nsc@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox