Skip to content

Sync README tutorial with example package - #66

Open
Herrtian wants to merge 1 commit into
pytest-dev:mainfrom
Herrtian:sync-readme-example
Open

Sync README tutorial with example package#66
Herrtian wants to merge 1 commit into
pytest-dev:mainfrom
Herrtian:sync-readme-example

Conversation

@Herrtian

@Herrtian Herrtian commented May 3, 2026

Copy link
Copy Markdown

Fixes #32.

The README tutorial had drifted from the checked-in example/mypkg package: it introduced path, Class1, and clsattr, but later showed mypkg.sub, which does not exist in that snippet.

This updates the README tutorial to use the same SomeClass / sub.OtherClass layout as the example package and updates the import snippet to match.

Checked with:

  • git diff --check
  • PYTHONPATH=example python -c "import mypkg; print(mypkg.SomeClass); print(mypkg.sub); print(mypkg.sub.OtherClass)"
  • python -m pytest -q (44 passed, after installing pytest and setuptools in a local venv)

@Herrtian

Herrtian commented May 3, 2026

Copy link
Copy Markdown
Author

Heads up: pre-commit.ci is failing in the existing pyupgrade hook before it gets to anything related to this README-only change:

TypeError: cannot use a bytes pattern on a string-like object

It looks like the old pyupgrade hook is running under Python 3.14 on pre-commit.ci. I left this PR scoped to the README fix for #32 rather than mixing in a pre-commit config update.

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.

Tutorial in README doesn't match code in example

1 participant