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

Method from_dict

ci/compiler/platformio_ini.py:1215–1227  ·  view source on GitHub ↗

Load configuration from a dictionary. Args: data: Dictionary with section names as keys and option dictionaries as values

(self, data: dict[str, dict[str, str]])

Source from the content-addressed store, hash-verified

1213 return result
1214
1215 def from_dict(self, data: dict[str, dict[str, str]]) -> None:
1216 """
1217 Load configuration from a dictionary.
1218
1219 Args:
1220 data: Dictionary with section names as keys and option dictionaries as values
1221 """
1222 self.config.clear()
1223 self._parsed_config = None # Invalidate parsed cache
1224 for section_name, options in data.items():
1225 self.config.add_section(section_name)
1226 for option, value in options.items():
1227 self.config.set(section_name, option, value)
1228
1229 @property
1230 def parsed(self) -> ParsedPlatformIOConfig:

Callers

nothing calls this directly

Calls 3

itemsMethod · 0.80
clearMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected