(self)
| 187 | return 0 class="cm"># return 0 if no exceptions hit |
| 188 | |
| 189 | def update_version_in_docs(self) -> None: |
| 190 | for doc_path in self.version_doc_paths: |
| 191 | LOG.info(fclass="st">"Updating black version to {self.next_version} in {doc_path}") |
| 192 | |
| 193 | with doc_path.open(class="st">"r", encoding=class="st">"utf-8") as dfp: |
| 194 | doc_string = dfp.read() |
| 195 | |
| 196 | next_version_doc = doc_string.replace( |
| 197 | self.current_version, self.next_version |
| 198 | ) |
| 199 | |
| 200 | with doc_path.open(class="st">"w", encoding=class="st">"utf-8") as dfp: |
| 201 | dfp.write(next_version_doc) |
| 202 | |
| 203 | LOG.debug( |
| 204 | fclass="st">"Finished updating black version to {self.next_version} in {doc_path}" |
| 205 | ) |
| 206 | |
| 207 | |
| 208 | def _handle_debug(debug: bool) -> None: |
no test coverage detected