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

Method parseString

ci/compiler/platformio_ini.py:967–992  ·  view source on GitHub ↗

Parse platformio.ini content from a string and return a fully formed instance. Args: content: INI content as string Returns: PlatformIOIni instance with the parsed configuration Raises: configparser.Error: If the content is malf

(content: str)

Source from the content-addressed store, hash-verified

965
966 @staticmethod
967 def parseString(content: str) -> "PlatformIOIni":
968 """
969 Parse platformio.ini content from a string and return a fully formed instance.
970
971 Args:
972 content: INI content as string
973
974 Returns:
975 PlatformIOIni instance with the parsed configuration
976
977 Raises:
978 configparser.Error: If the content is malformed
979 """
980 instance = object.__new__(PlatformIOIni)
981 instance.config = configparser.ConfigParser()
982 instance.file_path = None
983
984 try:
985 instance.config.read_string(content)
986 instance._parsed_config = None # Will be lazily parsed
987 logger.debug("Successfully parsed platformio.ini from string")
988 except configparser.Error as e:
989 logger.error(f"Error parsing platformio.ini from string: {e}")
990 raise
991
992 return instance
993
994 @staticmethod
995 def create() -> "PlatformIOIni":

Callers 3

test_optimize_methodMethod · 0.80

Calls 2

debugMethod · 0.80
errorMethod · 0.45

Tested by 2

test_optimize_methodMethod · 0.64