Releases: modern-python/eof-fixer
Release list
0.4.2
eof-fixer 0.4.2 — release pipeline on PyPI Trusted Publishing
No library changes. The package is identical to 0.4.1; this release exercises the new publish path end-to-end.
CI
- Releases now authenticate to PyPI via Trusted Publishing (OIDC) instead of a long-lived
PYPI_TOKENsecret.uv publishauto-detects the GitHub Actions id-token; the release job runs under apypienvironment that scopes the trusted publisher (#27).
Downstream
No action required. Nothing about the installed package changes.
0.4.1
eof-fixer 0.4.1 — internal refactor, one output-timing note
A maintenance release. No new features and no API changes. The fix logic was
restructured internally for testability and type-safety, with one subtle,
semantics-preserving change to when output is printed (see Behavior change).
Behavior change
Fixing <path>lines are now batch-rendered after the walk, not streamed
during it. The lines, their order, the files fixed, and the exit code are
all unchanged — only the timing differs (you see the report once the run
completes rather than incrementally). This fell out of moving the fix loop
behind a single interface; it does not affect use as a CI / pre-commit gate.
Internal refactors
- Fix logic extracted into
eof_fixer/fixer.py.fix_file(one open file)
andfix_directory(a tree) are now the seam;main()is a thin CLI adapter.
No behavior change beyond the output-timing note above. - Typed the EOF-action seam. The internal
none/append_lf/truncate
string contract became a sealed union (Noop | AppendLf | Truncate(offset))
consumed by an exhaustivematch, statically checked.
Packaging
- Corrected the README (the PyPI landing page): it now accurately documents
nested-.gitignoresupport and the--excludeflag shipped in 0.4.0.
Downstream
No action needed — the CLI, exit codes, and the set of files fixed are identical
to 0.4.0. The only observable difference is output timing (batch vs streamed).
Internals
- Test suite reorganized around the new
fixerinterface (content tests on
BytesIO, orchestration tests onfix_directory); the process/global-state
harness is gone for everything but two CLI-adapter tests. Coverage stays 100%. - Python 3.10 remains supported; exhaustiveness uses a vendored
_assert_never
(stdlibtyping.assert_neveris 3.11+). To be revisited at 3.10 EOL
(2026-10-31).
0.4.0
eof-fixer 0.4.0 — nested .gitignore, honored
eof-fixer now respects .gitignore files anywhere in the tree, not just the
one at the root, and adds a --exclude flag for extra skip paths. This changes
which files get fixed in repos that use per-directory .gitignore files — see
Why and Downstream below.
Feature
- Nested
.gitignoresupport. The file walk now honors.gitignorefiles
in subdirectories, with full git semantics: per-directory anchoring,
deepest-file-wins precedence,!negations that re-include, and pruning of
ignored directories. It stays pure-filesystem — nogitinvocation, no
.git/info/exclude, no globalcore.excludesFile— so it still works on any
directory, repo or not. --exclude DIR(repeatable). Skip extra file/directory names on top of
the always-skipped.gitand the default.cache/.uv-cache, e.g.
eof-fixer . --exclude node_modules --exclude dist..gitis never
configurable.
Packaging
- Enriched PyPI metadata (keywords, trove classifiers, project URLs) for better
discoverability on the package page.
Why
The headline contract is "respect the .gitignore," but until now only the
root file was read. Any repo placing .gitignore files in subdirectories — the
common monorepo / nested-package layout — had those rules silently ignored, so
the tool rewrote files git (and the user) expected it to leave alone. 0.4.0
closes that gap.
Downstream
No API change — the library/CLI surface is the same apart from the additive
--exclude flag. Behavior change to be aware of: files matched by a
subdirectory .gitignore are now skipped where 0.3.x would have fixed them. If
you relied on the old root-only behavior for a path, add it back explicitly or
adjust the relevant .gitignore. No action needed for the common case (you
almost certainly want those files skipped).
Internals
- New
eof_fixer/discovery.pyisolates file discovery (iter_text_files)
behind a clean seam; the EOF-fixing core is unchanged. - Built on the existing
pathspecdependency — no new runtime dependencies. - 100% test coverage maintained; nested precedence/negation/pruning
cross-checked against realgit check-ignore.
0.3.2
What's Changed
- Fix missing newline in output, clarify docs by @lesnik512 in #6
- Validate path arg, fix non-cwd resolution, refactor _fix_file by @lesnik512 in #7
Full Changelog: 0.3.1...0.3.2
0.3.1
0.3.0
0.2.2
0.2.1
0.2.0
What's Changed
- add README.md, LICENSE and write tests by @lesnik512 in #2
Full Changelog: 0.1.1...0.2.0