Skip to content

Fix code annotation in @computed_field documentation #11693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

Viicos
Copy link
Member

@Viicos Viicos commented Apr 4, 2025

Change Summary

Related issue number

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

@github-actions github-actions bot added the relnotes-fix Used for bugfixes. label Apr 4, 2025
@@ -949,7 +953,7 @@ class Box(BaseModel):
depth: float

@computed_field
@property # (1)!
@property
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already present in the previous code example, no need to add the annotation twice.

Copy link
Contributor

hyperlint-ai bot commented Apr 4, 2025

PR Change Summary

Updated the documentation for the @computed_field to clarify the use of the @property decorator for better type checking.

  • Clarified the documentation regarding the @computed_field and its implicit conversion to @property.
  • Emphasized the importance of explicitly using the @property decorator for type checking.

Modified Files

  • docs/concepts/fields.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.

Copy link

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0a9346c
Status: ✅  Deploy successful!
Preview URL: https://2c956f7e.pydantic-docs.pages.dev
Branch Preview URL: https://computed-fields-annotation.pydantic-docs.pages.dev

View logs

Copy link

codspeed-hq bot commented Apr 4, 2025

CodSpeed Performance Report

Merging #11693 will not alter performance

Comparing computed-fields-annotation (0a9346c) with main (bd1f8cf)

Summary

✅ 46 untouched benchmarks

Copy link
Contributor

github-actions bot commented Apr 4, 2025

Coverage report

This PR does not seem to contain any modification to coverable code.

@Viicos Viicos added the backport-2.11 Needs backport to 2.11 label Apr 8, 2025
@Viicos Viicos added relnotes-ignore Omit this PR from the release notes. and removed relnotes-fix Used for bugfixes. labels Apr 8, 2025
@Viicos Viicos merged commit 4a8c929 into main Apr 8, 2025
65 checks passed
@Viicos Viicos deleted the computed-fields-annotation branch April 8, 2025 12:58
Viicos added a commit that referenced this pull request Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-2.11 Needs backport to 2.11 relnotes-ignore Omit this PR from the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants