Skip to content

Document attrs.filters include and exclude helpers - #1628

Open
feiiiiii5 wants to merge 1 commit into
python-attrs:mainfrom
feiiiiii5:docs/attrs-filters-examples
Open

feiiiiii5 wants to merge 1 commit into
python-attrs:mainfrom
feiiiiii5:docs/attrs-filters-examples

Conversation

@feiiiiii5

Copy link
Copy Markdown

Summary

Fixes #1627.

The attrs.filters API section now demonstrates both filtering helpers with runnable examples that cover attrs.asdict() and attrs.astuple().

Pull Request Checklist

  • I acknowledge this project's AI policy.
  • This pull request is not from my main branch.
  • I've added tests (in tests/) which would fail without the patch (not applicable to this documentation-only change).
  • I've updated the documentation (in docs/), in case of behavior changes or new features.
  • I've added a new changelog entry (in docs/versionhistory.rst) (not applicable to this documentation-only change).

Testing

  • Directly executed both documented examples against the worktree: both produced the expected values.
  • pre-commit run --files docs/api.rst — all applicable hooks passed.
  • uv run tox run -e docs-doctests was attempted twice, but dependency installation did not complete because downloads repeatedly timed out; the Sphinx doctest result is therefore not claimed.

This branch has not been deployed

No deployments
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.

Docs: attrs.filters is missing stated examples

1 participant