Skip to content

docs: clarify metric prefix selection examples - #469

Open
tongwentao wants to merge 1 commit into
python-humanize:mainfrom
tongwentao:docs/metric-prefix-selection
Open

tongwentao wants to merge 1 commit into
python-humanize:mainfrom
tongwentao:docs/metric-prefix-selection

Conversation

@tongwentao

Copy link
Copy Markdown

Changes proposed in this pull request:

  • Correct the metric() explanation, which currently says non-significant zeroes are required when describing how prefixes avoid them.
  • Use lowercase k for kilo and turn the two prefix-selection examples into executable doctests showing the actual output, including spacing.

This only changes the docstring; runtime behavior is unchanged.

Validation on Linux, Python 3.13.5:

  • Number-module doctests: 8 passed, including the updated metric() examples.
  • mkdocs build --strict: passed; checked the generated number API page.
  • mypy .: passed for all 14 source files.
  • Configured prek hooks passed.

Prepared and validated with Codex assistance. The full runtime test suite and other platforms were not run for this documentation-only 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.

1 participant