From 694a24c3127bd4b1d9730e62fea5796da94bc81a Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Mon, 21 Oct 2024 08:48:11 -0700 Subject: [PATCH] tc_build: kernel: Silence new ruff warning (SIM115) This is the same warning that we already disable for pylint, for the reasons outlined in the comment block above this. tc_build/kernel.py:82:33: SIM115 Use a context manager for opening files | 80 | # always cleaned up. 81 | # pylint: disable-next=consider-using-with 82 | kconfig_allconfig = NamedTemporaryFile(dir=self.folders.build) | ^^^^^^^^^^^^^^^^^^ SIM115 83 | 84 | configs_to_disable = ['DRM_WERROR', 'WERROR'] | Found 1 error. Signed-off-by: Nathan Chancellor --- tc_build/kernel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc_build/kernel.py b/tc_build/kernel.py index f725e7c4..e2f71d64 100644 --- a/tc_build/kernel.py +++ b/tc_build/kernel.py @@ -79,7 +79,7 @@ def build(self): # try: ... finally: ... statement to ensure that this file is # always cleaned up. # pylint: disable-next=consider-using-with - kconfig_allconfig = NamedTemporaryFile(dir=self.folders.build) + kconfig_allconfig = NamedTemporaryFile(dir=self.folders.build) # noqa: SIM115 configs_to_disable = ['DRM_WERROR', 'WERROR'] kconfig_allconfig_text = ''.join(f"CONFIG_{val}=n\n"