Rewrite the assert statements in mod.
(
mod: ast.Module,
source: bytes,
module_path: str | None = None,
config: Config | None = None,
)
| 401 | |
| 402 | |
| 403 | def rewrite_asserts( |
| 404 | mod: ast.Module, |
| 405 | source: bytes, |
| 406 | module_path: str | None = None, |
| 407 | config: Config | None = None, |
| 408 | ) -> None: |
| 409 | """Rewrite the assert statements in mod.""" |
| 410 | AssertionRewriter(module_path, config, source).run(mod) |
| 411 | |
| 412 | |
| 413 | def _saferepr(obj: object) -> str: |