(modname: str, cmd: code_writer_cmd)
| 401 | |
| 402 | |
| 403 | def run_module(modname: str, cmd: code_writer_cmd) -> None: |
| 404 | cmd.write_status(f"importing module {modname}\n") |
| 405 | mod = importlib.import_module(modname) |
| 406 | destination_path = mod.__file__ |
| 407 | assert destination_path is not None |
| 408 | |
| 409 | tempfile = process_module(modname, destination_path, cmd) |
| 410 | |
| 411 | cmd.run_zimports(tempfile) |
| 412 | cmd.run_black(tempfile) |
| 413 | cmd.write_output_file_from_tempfile(tempfile, destination_path) |
| 414 | |
| 415 | |
| 416 | def main(cmd: code_writer_cmd) -> None: |
no test coverage detected