(modname: str, count: int, cmd: code_writer_cmd)
| 126 | |
| 127 | |
| 128 | def run_module(modname: str, count: int, cmd: code_writer_cmd) -> None: |
| 129 | cmd.write_status(f"importing module {modname}\n") |
| 130 | mod = importlib.import_module(modname) |
| 131 | destination_path = mod.__file__ |
| 132 | assert destination_path is not None |
| 133 | |
| 134 | tempfile = process_module(modname, destination_path, count, cmd) |
| 135 | |
| 136 | cmd.run_zimports(tempfile) |
| 137 | cmd.run_black(tempfile) |
| 138 | cmd.write_output_file_from_tempfile(tempfile, destination_path) |
| 139 | |
| 140 | |
| 141 | def main(cmd: code_writer_cmd) -> None: |
no test coverage detected