(modname: str, cmd: code_writer_cmd)
| 413 | |
| 414 | |
| 415 | def run_module(modname: str, cmd: code_writer_cmd) -> None: |
| 416 | cmd.write_status(f"importing module {modname}\n") |
| 417 | mod = importlib.import_module(modname) |
| 418 | destination_path = mod.__file__ |
| 419 | assert destination_path is not None |
| 420 | |
| 421 | tempfile = process_module(modname, destination_path, cmd) |
| 422 | |
| 423 | cmd.run_zimports(tempfile) |
| 424 | cmd.run_black(tempfile) |
| 425 | cmd.write_output_file_from_tempfile(tempfile, destination_path) |
| 426 | |
| 427 | |
| 428 | def main(cmd: code_writer_cmd) -> None: |
no test coverage detected