Skip to content

Conversation

kc0506
Copy link
Contributor

@kc0506 kc0506 commented Sep 10, 2024

Change Summary

Fix the following:

from pydantic import BaseModel
class A(BaseModel):
    type Int = int  # currently will throws an error because `TypeAliasType` is not in `default_ignored_types()`
    a: Int

See: https://docs.python.org/3/reference/simple_stmts.html#type

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 Sep 10, 2024
Copy link

codspeed-hq bot commented Sep 10, 2024

CodSpeed Performance Report

Merging #10369 will not alter performance

Comparing kc0506:fix-nested-type-stmt (f980f0d) with main (3bd7434)

Summary

✅ 49 untouched benchmarks

Copy link
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  pydantic/_internal
  _model_construction.py
Project Total  

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

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.

Great! Contributing to #9782 :)

@sydney-runkle sydney-runkle merged commit 8138311 into pydantic:main Sep 10, 2024
60 checks passed
@kc0506 kc0506 deleted the fix-nested-type-stmt branch October 14, 2024 10:05
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.

2 participants