Replaces an existing alignment with a new alignment.
(line: bytes, alignment: int)
| 61 | assert_valid_alignment(delegate_alignment, "delegate_alignment") |
| 62 | |
| 63 | def patch_alignment(line: bytes, alignment: int) -> bytes: |
| 64 | """Replaces an existing alignment with a new alignment.""" |
| 65 | return re.sub( |
| 66 | rb"\(\s*force_align\s*:\s*\d+\s*\)", |
| 67 | f"(force_align: {alignment})".encode("utf-8"), |
| 68 | line, |
| 69 | ) |
| 70 | |
| 71 | lines = [] |
| 72 | for line in schema.splitlines(): |
no test coverage detected