Force LF newlines and exactly one trailing newline.
(text: str)
| 331 | |
| 332 | |
| 333 | def _normalise(text: str) -> str: |
| 334 | """Force LF newlines and exactly one trailing newline.""" |
| 335 | text = text.replace("\r\n", "\n").replace("\r", "\n") |
| 336 | return text.rstrip("\n") + "\n" |
| 337 | |
| 338 | |
| 339 | @dataclass(frozen=True) |
no outgoing calls
no test coverage detected