Rewrite the assert statements in mod.
(
mod: ast.Module,
source: bytes,
module_path: Optional[str] = None,
config: Optional[Config] = None,
)
| 417 | |
| 418 | |
| 419 | def rewrite_asserts( |
| 420 | mod: ast.Module, |
| 421 | source: bytes, |
| 422 | module_path: Optional[str] = None, |
| 423 | config: Optional[Config] = None, |
| 424 | ) -> None: |
| 425 | """Rewrite the assert statements in mod.""" |
| 426 | AssertionRewriter(module_path, config, source).run(mod) |
| 427 | |
| 428 | |
| 429 | def _saferepr(obj: object) -> str: |