(lines: list[str], file: str)
| 303 | |
| 304 | |
| 305 | def apply_is_sync(lines: list[str], file: str) -> list[str]: |
| 306 | try: |
| 307 | is_sync = next(iter([line for line in lines if line.startswith("_IS_SYNC = ")])) |
| 308 | index = lines.index(is_sync) |
| 309 | is_sync = is_sync.replace("False", "True") |
| 310 | lines[index] = is_sync |
| 311 | except StopIteration as e: |
| 312 | print( |
| 313 | f"Missing _IS_SYNC at top of async file {file.replace('synchronous', 'asynchronous')}" |
| 314 | ) |
| 315 | raise e |
| 316 | return lines |
| 317 | |
| 318 | |
| 319 | def translate_coroutine_types(lines: list[str]) -> list[str]: |
no test coverage detected