Skip to content

Fix crash when expanding root type in the mypy plugin#11735

Merged
Viicos merged 1 commit intomainfrom
root-type-fw-ref
Apr 17, 2025
Merged

Fix crash when expanding root type in the mypy plugin#11735
Viicos merged 1 commit intomainfrom
root-type-fw-ref

Conversation

@Viicos
Copy link
Copy Markdown
Member

@Viicos Viicos commented Apr 11, 2025

Change Summary

Fixes #11727.

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 11, 2025
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 11, 2025

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 16d112c
Status: ✅  Deploy successful!
Preview URL: https://852d7a4a.pydantic-docs.pages.dev
Branch Preview URL: https://root-type-fw-ref.pydantic-docs.pages.dev

View logs

@Viicos Viicos force-pushed the root-type-fw-ref branch from ace3d84 to 16d112c Compare April 11, 2025 08:51
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 11, 2025

CodSpeed Performance Report

Merging #11735 will not alter performance

Comparing root-type-fw-ref (16d112c) with main (2e7cddb)

Summary

✅ 46 untouched benchmarks

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 11, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  pydantic
  mypy.py 345
Project Total  

This report was generated by python-coverage-comment-action

Copy link
Copy Markdown
Contributor

@dmontagu dmontagu left a comment

Choose a reason for hiding this comment

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

no idea what's going on but this seems safe enough

@Viicos
Copy link
Copy Markdown
Member Author

Viicos commented Apr 17, 2025

no idea what's going on but this seems safe enough

Not entirely sure either, this happens with forward references but my mypy knowledge is too limited to understand how they do it for stdlib dataclasses..

@Viicos Viicos merged commit c477e46 into main Apr 17, 2025
62 checks passed
@Viicos Viicos deleted the root-type-fw-ref branch April 17, 2025 16:31
Viicos added a commit that referenced this pull request Apr 17, 2025
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.

Exception in mypy plugin with type alias, root model and forward reference

2 participants