Skip to content

Honor custom comma in threshold number formatting#251

Open
gaoflow wants to merge 1 commit into
jaraco:mainfrom
gaoflow:fix-176-threshold-custom-comma
Open

Honor custom comma in threshold number formatting#251
gaoflow wants to merge 1 commit into
jaraco:mainfrom
gaoflow:fix-176-threshold-custom-comma

Conversation

@gaoflow

@gaoflow gaoflow commented Jun 22, 2026

Copy link
Copy Markdown

Summary

  • use the supplied comma separator when threshold formatting keeps numbers numeric
  • preserve comma=0 behavior that disables digit grouping
  • add regression coverage for custom separators across one and multiple groups

Fixes #176

Verification

  • python -m pytest tests/test_numwords.py::test_lines -q
  • python -m pytest -q
  • python -m compileall inflect tests
  • python -m ruff format --check inflect/init.py tests/test_numwords.py
  • git diff --check upstream/main...HEAD

Note: python -m ruff check inflect/init.py tests/test_numwords.py still reports pre-existing UP006/UP007/UP035 typing modernization diagnostics across inflect/init.py that are unrelated to this change.

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.

number_to_words: support for custom comma-separators is broken/incomplete

1 participant