(fpin: Path, fpout: Path)
| 121 | |
| 122 | |
| 123 | def convert(fpin: Path, fpout: Path) -> None: |
| 124 | logger.info("converting %s", fpin) |
| 125 | with fpin.open() as f: |
| 126 | source = f.read() |
| 127 | |
| 128 | tree = ast.parse(source, filename=str(fpin)) |
| 129 | tree = async_to_sync(tree, filepath=fpin) |
| 130 | output = tree_to_str(tree, fpin) |
| 131 | |
| 132 | with fpout.open("w") as f: |
| 133 | print(output, file=f) |
| 134 | |
| 135 | sp.check_call(["black", "-q", str(fpout)]) |
| 136 | sp.check_call(["isort", "-q", str(fpout)]) |
| 137 | |
| 138 | |
| 139 | def check(outputs: list[str]) -> int: |
no test coverage detected