MCPcopy Create free account
hub / github.com/FastLED/FastLED / AssetScanResult

Class AssetScanResult

ci/compiler/asset_scanner.py:61–78  ·  view source on GitHub ↗

Result of scanning a sketch's ``data/`` directory. Attributes: manifest: Dict mapping relative asset paths (POSIX form, e.g. ``"data/track.mp3"``) to ``AssetEntry``. Missing ``data/`` or an empty one yields an empty dict — not an error. warnings: Non-fata

Source from the content-addressed store, hash-verified

59
60@dataclass
61class AssetScanResult:
62 """Result of scanning a sketch's ``data/`` directory.
63
64 Attributes:
65 manifest: Dict mapping relative asset paths (POSIX form, e.g.
66 ``"data/track.mp3"``) to ``AssetEntry``. Missing ``data/`` or an
67 empty one yields an empty dict — not an error.
68 warnings: Non-fatal issues encountered during scanning (malformed
69 ``.lnk`` files, unreadable files, etc.). Callers should log them
70 but the build should NOT fail on these.
71 """
72
73 manifest: dict[str, AssetEntry] = field(default_factory=dict)
74 warnings: list[str] = field(default_factory=list)
75
76 def to_json_dict(self) -> dict[str, dict[str, str | None]]:
77 """Return manifest as a plain nested dict for JSON serialization."""
78 return {key: asdict(entry) for key, entry in self.manifest.items()}
79
80
81# -----------------------------------------------------------------------------

Calls

no outgoing calls