Skip to content

Conversation

@dmontagu
Copy link
Contributor

Remove defaults from the repr of all dataclasses in messages.py. This cleans up the way a lot of things print out, you can see in the updates to the docs/docstrings.

I think we could probably do this for all dataclasses in the library but don't necessarily need to let that get in the way of this improvement.

@dmontagu dmontagu requested a review from DouweM May 22, 2025 20:40
@hyperlint-ai
Copy link
Contributor

hyperlint-ai bot commented May 22, 2025

PR Change Summary

Cleaned up the representation of dataclasses in the messages module by removing default values from their repr methods, enhancing the clarity of printed outputs.

  • Removed default values from the repr of all dataclasses in messages.py
  • Improved the readability of printed outputs in various documentation sections
  • Considered extending similar changes to all dataclasses in the library

Modified Files

  • docs/agents.md
  • docs/api/models/function.md
  • docs/direct.md
  • docs/message-history.md
  • docs/tools.md

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

@github-actions
Copy link

github-actions bot commented May 22, 2025

Docs Preview

commit: 234bea1
Preview URL: https://688b9744-pydantic-ai-previews.pydantic.workers.dev

@DouweM DouweM enabled auto-merge (squash) May 22, 2025 21:08
@DouweM DouweM merged commit 154fec5 into main May 22, 2025
17 checks passed
@DouweM DouweM deleted the clean-up-dc-reprs branch May 22, 2025 21:12
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.

3 participants