Skip to content

Commit

Permalink
tc_build: kernel: Silence new ruff warning (SIM115)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
nathanchance committed Oct 21, 2024
1 parent f788658 commit 694a24c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tc_build/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 694a24c

Please sign in to comment.