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

Method get_option

ci/compiler/platformio_ini.py:1077–1093  ·  view source on GitHub ↗

Get an option value from a section. Args: section: Section name option: Option name fallback: Default value if option doesn't exist Returns: Option value or fallback if not found

(
        self, section: str, option: str, fallback: Optional[str] = None
    )

Source from the content-addressed store, hash-verified

1075 return self.config.has_option(section, option)
1076
1077 def get_option(
1078 self, section: str, option: str, fallback: Optional[str] = None
1079 ) -> Optional[str]:
1080 """
1081 Get an option value from a section.
1082
1083 Args:
1084 section: Section name
1085 option: Option name
1086 fallback: Default value if option doesn't exist
1087
1088 Returns:
1089 Option value or fallback if not found
1090 """
1091 if not self.config.has_section(section):
1092 return fallback
1093 return self.config.get(section, option, fallback=fallback)
1094
1095 def set_option(self, section: str, option: str, value: str) -> None:
1096 """

Calls 2

has_sectionMethod · 0.80
getMethod · 0.45