tools: binman: ti_board_cfg: Fix pylint error over 'br'
PATCH 1/1 tools: binman: ti_board_cfg: Fix pylint error over 'br'
With a newer pylint, we get a warning that 'br' could be used before assignment. Fix this by declaring br first as an empty bytearray.
---
Cc: Neha Malcom Francis <[email protected]>
Cc: Simon Glass <[email protected]>
--- tools/binman/etype/ti_board_config.py | 1 + 1 file changed, 1 insertion(+)
tools/binman/etype/ti_board_config.py +1 -0
@@ -119,6 +119,7 @@ class Entry_ti_board_config(Entry_section): array of bytes representing value """ size = 0 + br = bytearray() if (data_type == '#/definitions/u8'): size = 1 elif (data_type == '#/definitions/u16'):
Signature · 1 line
2.43.0
Hi Tom,
Quoted 16 lines · Tom Rini
With a newer pylint, we get a warning that 'br' could be used before assignment. Fix this by declaring br first as an empty bytearray.
Signed-off-by Tom Rini <[email protected]>---
Cc: Neha Malcom Francis <[email protected]>
Cc: Simon Glass <[email protected]>--- tools/binman/etype/ti_board_config.py | 1 + 1 file changed, 1 insertion(+)tools/binman/etype/ti_board_config.py +0
-0
tools/binman/etype/ti_board_config.py class Entry_ti_board_config(Entry_section): · line 125
Quoted 7 lines
tools/binman/etype/ti_board_config.py +1
-0@@ -119,6 +119,7 @@ class Entry_ti_board_config(Entry_section): array of bytes representing value """ size = 0 + br = bytearray() if (data_type == '#/definitions/u8'): size = 1 elif (data_type == '#/definitions/u16'):
Signature · 2 lines
Thanking You Neha Malcom Francis
Quoted 4 lines · Tom Rini
With a newer pylint, we get a warning that 'br' could be used before assignment. Fix this by declaring br first as an empty bytearray.
Applied to u-boot/next, thanks!
Signature · 1 line
Tom