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
6 changes: 2 additions & 4 deletions .github/workflows/_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- run: uv python install 3.10
- run: uv python pin 3.10
- run: uv python install 3.11
- run: uv python pin 3.11
- run: just install lint-ci
- run: just adr-check

Expand All @@ -23,7 +23,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
Expand Down Expand Up @@ -54,7 +53,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
Expand Down
12 changes: 0 additions & 12 deletions docs/adr/0002-keep-py310-vendored-assert-never.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/agents/domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Single-context repo:
├── CONTEXT.md
├── docs/adr/
│ ├── 0001-build-on-pathspec-for-nested-gitignore.md
│ └── 0002-keep-py310-vendored-assert-never.md
│ └── 0003-fix-directory-returns-a-path-list-and-writes-nothing.md
└── eof_fixer/
```

Expand Down
9 changes: 2 additions & 7 deletions eof_fixer/fixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import pathlib
from collections.abc import Iterator, Sequence
from typing import IO, NoReturn
from typing import IO, assert_never

from eof_fixer.discovery import iter_text_files

Expand All @@ -11,11 +11,6 @@
_BINARY_SAMPLE_SIZE = 1024


def _assert_never(value: NoReturn) -> NoReturn:
"""Static-exhaustiveness guard: ty errors if any union member can reach here."""
raise AssertionError(value) # pragma: no cover - ty proves every call unreachable (ADR-0002)


@dataclasses.dataclass(frozen=True)
class Noop:
"""No change: the file is empty or already ends with exactly one terminator."""
Expand Down Expand Up @@ -100,7 +95,7 @@ def fix_file(file_obj: IO[bytes], *, check: bool) -> bool:
file_obj.truncate()
return True
case _: # pragma: no cover - exhaustiveness guard; ty verifies every _EofAction is matched
_assert_never(action)
assert_never(action)


def fix_directory(
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "eof-fixer"
description = "CLI tool that ensures text files end with exactly one newline"
license = "MIT"
readme = "README.md"
requires-python = ">=3.10,<4"
requires-python = ">=3.11,<4"
dependencies = [
"pathspec>=0.12",
]
Expand All @@ -22,7 +22,6 @@ classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Typing :: Typed",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
Expand Down
Loading