Set an option value in a section. Args: section: Section name option: Option name value: Option value
(self, section: str, option: str, value: str)
| 1093 | return self.config.get(section, option, fallback=fallback) |
| 1094 | |
| 1095 | def set_option(self, section: str, option: str, value: str) -> None: |
| 1096 | """ |
| 1097 | Set an option value in a section. |
| 1098 | |
| 1099 | Args: |
| 1100 | section: Section name |
| 1101 | option: Option name |
| 1102 | value: Option value |
| 1103 | """ |
| 1104 | if not self.config.has_section(section): |
| 1105 | self.config.add_section(section) |
| 1106 | self.config.set(section, option, value) |
| 1107 | self.invalidate_cache() # Invalidate cache when config changes |
| 1108 | |
| 1109 | def remove_option(self, section: str, option: str) -> bool: |
| 1110 | """ |
no test coverage detected