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

Method replace_url

ci/compiler/platformio_ini.py:1153–1173  ·  view source on GitHub ↗

Replace a URL in the configuration. Args: section: Section name option: Option name old_url: URL to replace new_url: New URL value Returns: True if replacement was made, False otherwise

(
        self, section: str, option: str, old_url: str, new_url: str
    )

Source from the content-addressed store, hash-verified

1151 return urls
1152
1153 def replace_url(
1154 self, section: str, option: str, old_url: str, new_url: str
1155 ) -> bool:
1156 """
1157 Replace a URL in the configuration.
1158
1159 Args:
1160 section: Section name
1161 option: Option name
1162 old_url: URL to replace
1163 new_url: New URL value
1164
1165 Returns:
1166 True if replacement was made, False otherwise
1167 """
1168 replacement_made = False
1169 current_value = self.get_option(section, option)
1170 if current_value == old_url:
1171 self.set_option(section, option, new_url)
1172 replacement_made = True
1173 return replacement_made
1174
1175 def validate_structure(self) -> list[str]:
1176 """

Callers 4

optimizeMethod · 0.95
optimize_enhancedMethod · 0.95
_replace_all_urlsFunction · 0.80
test_parse_and_dumpMethod · 0.80

Calls 2

get_optionMethod · 0.95
set_optionMethod · 0.95

Tested by 1

test_parse_and_dumpMethod · 0.64