Check whether the file is writable. If the file is not writable, a `FileModeError` is raised.
(self)
| 2335 | return self.mode in ("w", "a", "r+") |
| 2336 | |
| 2337 | def _check_writable(self) -> None: |
| 2338 | """Check whether the file is writable. |
| 2339 | |
| 2340 | If the file is not writable, a `FileModeError` is raised. |
| 2341 | |
| 2342 | """ |
| 2343 | if not self._iswritable(): |
| 2344 | raise FileModeError("the file is not writable") |
| 2345 | |
| 2346 | def _check_group(self, node: Group) -> None: |
| 2347 | # `node` must already be a node. |
no test coverage detected