Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions planning/changes/2026-06-26.03-type-eof-action-seam.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,18 @@ change to what the tool does.

```python
@dataclasses.dataclass(frozen=True)
class Noop: ... # empty, or already ends with exactly one terminator
class Noop: ... # empty, or already ends with exactly one terminator


@dataclasses.dataclass(frozen=True)
class AppendLf: ... # lacks a trailing newline; append one LF
class AppendLf: ... # lacks a trailing newline; append one LF


@dataclasses.dataclass(frozen=True)
class Truncate: # excess trailing newlines; truncate to `offset` (0 = empty)
class Truncate: # excess trailing newlines; truncate to `offset` (0 = empty)
offset: int


_EofAction = Noop | AppendLf | Truncate
```

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ ignore = [
"D213", # "multi-line-summary-second-line" conflicting with D212
"COM812", # flake8-commas "Trailing comma missing"
"ISC001", # flake8-implicit-str-concat
"CPY001", # no per-file copyright header
]
isort.lines-after-imports = 2
isort.no-lines-before = ["standard-library", "local-folder"]
Expand Down
Loading