Skip to content

Support pathlib.Path inputs - #14

Merged
Nanahuse merged 3 commits into
feature/v1.2.0from
feature/pathlib-path-support
Aug 9, 2026
Merged

Nanahuse merged 3 commits into
feature/v1.2.0from
feature/pathlib-path-support

Conversation

@Nanahuse

@Nanahuse Nanahuse commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Accept pathlib.Path and other os.PathLike[str] values for executable, text-file, and output paths.
  • Normalize path-like values with os.fspath() before passing them to VOICEPEAK.
  • Add focused tests and documentation for pathlib.Path inputs.

Why

The public path parameters were annotated as str, and the text-file command builder only matched string values. This prevented callers from using Python's standard pathlib.Path objects consistently.

User impact

Existing str callers remain compatible. Users can now pass pathlib.Path to Voicepeak(exe_path=...), say_text(output_path=...), and say_textfile(text_path=..., output_path=...).

Validation

  • uv run --group dev --with-editable . pytest -q — 8 passed
  • uv run --group dev ty check . — passed
  • git diff --check — passed

Repository-wide Ruff cleanup is intentionally handled separately.

@Nanahuse
Nanahuse force-pushed the feature/pathlib-path-support branch from 9422b3e to ebb8176 Compare August 9, 2026 03:28
@Nanahuse
Nanahuse marked this pull request as ready for review August 9, 2026 06:22
@Nanahuse
Nanahuse merged commit a3785f8 into feature/v1.2.0 Aug 9, 2026
4 checks passed
@Nanahuse
Nanahuse deleted the feature/pathlib-path-support branch August 9, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant