scripts: west: runners: stm32cubeprogrammer: fix E0606 related to dl_file

Initialize 'dl_file' to 'None' before the logic that determines
which binary file to load.

Resolves the E0606 Pylint warning.

Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
This commit is contained in:
Georgij Černyšiov 2025-07-17 10:13:29 +02:00 committed by Anas Nashif
parent 9c480a3e80
commit e71f79d644

View File

@ -270,6 +270,8 @@ class STM32CubeProgrammerBinaryRunner(ZephyrBinaryRunner):
self.check_call(cmd + ["--erase", "all"])
# Define binary to be loaded
dl_file = None
if self._use_elf:
# Use elf file if instructed to do so.
dl_file = self.cfg.elf_file