Convert all_characters to a list before using extend()

This commit is contained in:
James Carr 2021-08-31 15:26:28 +01:00
parent d314df8b84
commit 3e543264a5
No known key found for this signature in database
GPG Key ID: 04CEE584D0B924E0

View File

@ -13,7 +13,7 @@ sys.path.insert(0, "../../tools/bitmap_font")
from adafruit_bitmap_font import bitmap_font
parser = argparse.ArgumentParser(description="Generate USB descriptors.")
parser = argparse.ArgumentParser(description="Generate displayio resources.")
parser.add_argument("--font", type=str, help="Font path", required=True)
parser.add_argument("--extra_characters", type=str, help="Unicode string of extra characters")
parser.add_argument(
@ -49,7 +49,7 @@ if args.sample_file:
# Merge visible ascii, sample characters and extra characters.
visible_ascii = bytes(range(0x20, 0x7F)).decode("utf-8")
all_characters = visible_ascii
all_characters = list(visible_ascii)
for c in sample_characters:
if c not in all_characters:
all_characters += c