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

Function _parse_list_value

ci/compiler/platformio_ini.py:507–530  ·  view source on GitHub ↗

Parse a configuration value that can be either comma-separated or multi-line. Args: value: Raw configuration value Returns: List of parsed values

(value: str)

Source from the content-addressed store, hash-verified

505
506
507def _parse_list_value(value: str) -> list[str]:
508 """
509 Parse a configuration value that can be either comma-separated or multi-line.
510
511 Args:
512 value: Raw configuration value
513
514 Returns:
515 List of parsed values
516 """
517 if not value or not value.strip():
518 return []
519
520 # Handle multi-line format (values on separate lines)
521 if "\n" in value:
522 lines = [line.strip() for line in value.split("\n") if line.strip()]
523 return lines
524
525 # Handle comma-separated format
526 if "," in value:
527 return [item.strip() for item in value.split(",") if item.strip()]
528
529 # Single value
530 return [value.strip()] if value.strip() else []
531
532
533def _parse_platformio_section(

Callers 4

_resolve_list_variablesFunction · 0.85
_parse_env_sectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected