Write `content` to `path` with the configured encoding. The file is opened with `smart_open`, so the line ending follows `git config core.eol`, as it does for `version_files` and the changelog.
(self, path: Path, content: str)
| 55 | return self.config.settings["encoding"] |
| 56 | |
| 57 | def _write_text(self, path: Path, content: str) -> None: |
| 58 | """Write `content` to `path` with the configured encoding. |
| 59 | |
| 60 | The file is opened with `smart_open`, so the line ending follows |
| 61 | `git config core.eol`, as it does for `version_files` and the changelog. |
| 62 | """ |
| 63 | with smart_open(path, "w", encoding=self._get_encoding()) as file: |
| 64 | file.write(content) |
| 65 | |
| 66 | |
| 67 | class JsonProvider(FileProvider): |
no test coverage detected