(code: str)
| 105 | |
| 106 | |
| 107 | def format_code_block(code: str) -> str: |
| 108 | return subprocess.check_output( |
| 109 | [ |
| 110 | sys.executable, |
| 111 | "-m", |
| 112 | "ruff", |
| 113 | "format", |
| 114 | "--stdin-filename=script.py", |
| 115 | f"--line-length={DEFAULT_LINE_LENGTH}", |
| 116 | ], |
| 117 | encoding="utf-8", |
| 118 | input=code, |
| 119 | ) |
| 120 | |
| 121 | |
| 122 | def format_file( |
no outgoing calls
no test coverage detected