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