Commit a74f222b authored by Benjamin Cabé's avatar Benjamin Cabé Committed by Chris Friedt
Browse files

doc: _scripts: use tuple instead of list for gen_boards_catalog



Changed a bunch of immutable sequences from being lists to tuples.

Signed-off-by: default avatarBenjamin Cabé <benjamin@zephyrproject.org>
parent 9b335c82
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -20,14 +20,14 @@ from runners.core import ZephyrBinaryRunner

ZEPHYR_BASE = Path(__file__).parents[2]
ZEPHYR_BINDINGS = ZEPHYR_BASE / "dts/bindings"
EDT_PICKLE_PATHS = [
EDT_PICKLE_PATHS = (
    "zephyr/edt.pickle",
    "hello_world/zephyr/edt.pickle",  # for board targets using sysbuild
]
RUNNERS_YAML_PATHS = [
)
RUNNERS_YAML_PATHS = (
    "zephyr/runners.yaml",
    "hello_world/zephyr/runners.yaml",  # for board targets using sysbuild
]
)

logger = logging.getLogger(__name__)

@@ -87,12 +87,12 @@ def guess_file_from_patterns(directory, patterns, name, extensions):


def guess_image(board_or_shield):
    img_exts = ["jpg", "jpeg", "webp", "png"]
    patterns = [
    img_exts = ("jpg", "jpeg", "webp", "png")
    patterns = (
        "**/{name}.{ext}",
        "**/*{name}*.{ext}",
        "**/*.{ext}",
    ]
    )
    img_file = guess_file_from_patterns(
        board_or_shield.dir, patterns, board_or_shield.name, img_exts
    )
@@ -101,12 +101,12 @@ def guess_image(board_or_shield):


def guess_doc_page(board_or_shield):
    patterns = [
    patterns = (
        "doc/index.{ext}",
        "**/{name}.{ext}",
        "**/*{name}*.{ext}",
        "**/*.{ext}",
    ]
    )
    doc_file = guess_file_from_patterns(
        board_or_shield.dir, patterns, board_or_shield.name, ["rst"]
    )