Skip to content

Releases: modern-python/eof-fixer

0.4.2

Choose a tag to compare

@github-actions github-actions released this 01 Jul 20:44
4aac159

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_TOKEN secret. uv publish auto-detects the GitHub Actions id-token; the release job runs under a pypi environment that scopes the trusted publisher (#27).

Downstream

No action required. Nothing about the installed package changes.

0.4.1

Choose a tag to compare

@github-actions github-actions released this 26 Jun 20:10
f873ff6

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)
    and fix_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 exhaustive match, statically checked.

Packaging

  • Corrected the README (the PyPI landing page): it now accurately documents
    nested-.gitignore support and the --exclude flag 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 fixer interface (content tests on
    BytesIO, orchestration tests on fix_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
    (stdlib typing.assert_never is 3.11+). To be revisited at 3.10 EOL
    (2026-10-31).

0.4.0

Choose a tag to compare

@github-actions github-actions released this 26 Jun 17:59
fa1e8e8

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 .gitignore support. The file walk now honors .gitignore files
    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 — no git invocation, no
    .git/info/exclude, no global core.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 .git and the default .cache / .uv-cache, e.g.
    eof-fixer . --exclude node_modules --exclude dist. .git is 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.py isolates file discovery (iter_text_files)
    behind a clean seam; the EOF-fixing core is unchanged.
  • Built on the existing pathspec dependency — no new runtime dependencies.
  • 100% test coverage maintained; nested precedence/negation/pruning
    cross-checked against real git check-ignore.

0.3.2

Choose a tag to compare

@lesnik512 lesnik512 released this 31 May 10:40
205d5df

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

Choose a tag to compare

@lesnik512 lesnik512 released this 14 Mar 08:32
777f833

What's Changed

Full Changelog: 0.3.0...0.3.1

0.3.0

Choose a tag to compare

@lesnik512 lesnik512 released this 20 Dec 07:29
2a22046

What's Changed

Full Changelog: 0.2.2...0.3.0

0.2.2

Choose a tag to compare

@lesnik512 lesnik512 released this 17 Dec 08:02

What's changed

  • extended default ignore dirs: .uv-cache is added

Full Changelog: 0.2.1...0.2.2

0.2.1

Choose a tag to compare

@lesnik512 lesnik512 released this 05 Dec 04:47
7da186d

What's Changed

Full Changelog: 0.2.0...0.2.1

0.2.0

Choose a tag to compare

@lesnik512 lesnik512 released this 11 Nov 07:43
390fa0a

What's Changed

  • add README.md, LICENSE and write tests by @lesnik512 in #2

Full Changelog: 0.1.1...0.2.0

0.1.1

Choose a tag to compare

@lesnik512 lesnik512 released this 10 Nov 06:03

Full Changelog: 0.1.0...0.1.1