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