Skip to content

docs: use parse API in the README example - #79

Merged
RonnyPfannschmidt merged 1 commit into
pytest-dev:mainfrom
MbappeWU:codex/docs-parse-inline-comments
Oct 6, 2026
Merged

RonnyPfannschmidt merged 1 commit into
pytest-dev:mainfrom
MbappeWU:codex/docs-parse-inline-comments

Conversation

@MbappeWU

@MbappeWU MbappeWU commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

The README constructs IniConfig() but shows values with inline comments removed. The constructor deliberately preserves those comments for compatibility, so the first displayed result is currently incorrect.

Use the IniConfig.parse() API introduced in #70, and explain how the constructor and strip_inline_comments=False preserve comments. This updates the documented example without changing parser behavior.

Validation on Python 3.13.12 with the original frozen development dependencies:

  • Unchanged README doctest: one failure (value1 expected; value1 # comment returned).
  • Updated README doctest: passed; original parser suite: 51 passed before and after.
  • Actual Setuptools wheel/sdist build and strict Twine checks: passed. The updated README matches the wheel long description and sdist README; all four tracked runtime files and py.typed content match source.
  • A fresh neutral wheel installation passed three public API assertions for default parsing, constructor compatibility, and explicit comment preservation.
  • git diff --check: passed.

The generated version module has the same version as package metadata; its commit ID is absent in the wheel built from the sdist, as expected without Git metadata. These are local validation distributions, not a release.

AI assistance: prepared with OpenAI Codex and checked by a separate AI review. No human review is claimed by those checks.

@MbappeWU
MbappeWU marked this pull request as ready for review October 5, 2026 20:43
@RonnyPfannschmidt
RonnyPfannschmidt merged commit 40d8c03 into pytest-dev:main Oct 6, 2026
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.

2 participants