Skip to content

Raise an error when Self is invalid #10609

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 6 commits into from
Oct 14, 2024
Merged

Conversation

kc0506
Copy link
Contributor

@kc0506 kc0506 commented Oct 12, 2024

Change Summary

Raise an error when Self is used but self.model_type_stack.get() returns None.

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 Oct 12, 2024
Copy link
Contributor

github-actions bot commented Oct 12, 2024

Coverage report

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

Copy link
Contributor

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

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

Thanks @kc0506!

I'm happy with this change. Let's check what @Viicos thinks before we merge.

Copy link

codspeed-hq bot commented Oct 13, 2024

CodSpeed Performance Report

Merging #10609 will not alter performance

Comparing kc0506:add-invalid-self-error (8d47aba) with main (1940011)

Summary

✅ 44 untouched benchmarks

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
@Viicos Viicos enabled auto-merge (squash) October 14, 2024 08:23
@Viicos
Copy link
Member

Viicos commented Oct 14, 2024

Thanks @kc0506

@Viicos Viicos merged commit 6d3717c into pydantic:main Oct 14, 2024
59 checks passed
@kc0506 kc0506 deleted the add-invalid-self-error branch October 14, 2024 10:05
@kc0506 kc0506 mentioned this pull request Oct 18, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes-fix Used for bugfixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants