Format a file in place.
(file: Path)
| 52 | stderr=subprocess.DEVNULL |
| 53 | ) |
| 54 | return result.returncode == 0 |
| 55 | |
| 56 | |
| 57 | def format_file(file: Path) -> None: |
| 58 | """Format a file in place.""" |
| 59 | subprocess.run( |
| 60 | ["clang-format", "-i", str(file)], |
| 61 | check=True |
| 62 | ) |