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

Function should_skip_example_for_board

ci/compiler/board_example_utils.py:193–215  ·  view source on GitHub ↗

Check if an example should be skipped for a specific board. Parses the @filter/@end-filter block from the .ino file and determines if compilation should be skipped based on board properties. Args: board: Board configuration example: Example name Returns: Tu

(board: Board, example: str)

Source from the content-addressed store, hash-verified

191
192
193def should_skip_example_for_board(board: Board, example: str) -> tuple[bool, str]:
194 """Check if an example should be skipped for a specific board.
195
196 Parses the @filter/@end-filter block from the .ino file and determines
197 if compilation should be skipped based on board properties.
198
199 Args:
200 board: Board configuration
201 example: Example name
202
203 Returns:
204 Tuple of (skip: bool, reason: str)
205 - skip=True means don't compile for this board
206 - reason explains why (or empty string if not skipped)
207 """
208 try:
209 ino_path = get_example_ino_path(example)
210 except FileNotFoundError:
211 # If we can't find the .ino file, don't skip
212 return False, ""
213
214 sketch_filter = parse_filter_from_sketch(ino_path)
215 return should_skip_sketch(board, sketch_filter)
216
217
218def get_filtered_examples(

Calls 3

parse_filter_from_sketchFunction · 0.90
should_skip_sketchFunction · 0.90
get_example_ino_pathFunction · 0.85