scripts: west_commands: runners: Ignore open file without ctx (SIM115)
Add noqa to a complex statement with multiple open/close statements. See https://docs.astral.sh/ruff/rules/open-file-with-context-handler/ Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
2e39674344
commit
dbaf01ef28
1 changed files with 1 additions and 1 deletions
|
@ -278,7 +278,7 @@ class CANopenProgramDownloader(object):
|
|||
self.logger.info('Downloading program: %s', bin_file)
|
||||
try:
|
||||
size = os.path.getsize(bin_file)
|
||||
infile = open(bin_file, 'rb')
|
||||
infile = open(bin_file, 'rb') # noqa: SIM115
|
||||
outfile = self.data_sdo.open('wb', buffering=self.download_buffer_size,
|
||||
size=size, block_transfer=self.block_transfer)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue