From eb95c808155fce89dc49b9d748fc8ee9ecc95d15 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Fri, 12 Apr 2024 18:12:04 -0500 Subject: [PATCH] unsatisfyingly fix a mypy bytes vs. bytearray issue Signed-off-by: Brian S. Stephan --- gp2040ce_bintools/storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gp2040ce_bintools/storage.py b/gp2040ce_bintools/storage.py index 8e877c7..c308775 100644 --- a/gp2040ce_bintools/storage.py +++ b/gp2040ce_bintools/storage.py @@ -217,7 +217,7 @@ def get_config_from_file(filename: str, whole_board: bool = False, allow_no_file try: with open(filename, 'rb') as dump: if filename[-4:] == '.uf2': - content = bytes(convert_uf2_to_binary(dump.read())) + content = bytes(convert_uf2_to_binary(bytearray(dump.read()))) else: content = dump.read() except FileNotFoundError: