Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Tweak type alias logics#10643

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Viicos merged 3 commits intopydantic:mainfromkc0506:tweak-type-alias
Oct 17, 2024
Merged

Tweak type alias logics#10643

Viicos merged 3 commits intopydantic:mainfromkc0506:tweak-type-alias
Oct 17, 2024

Conversation

kc0506
Copy link
Contributor

@kc0506kc0506 commentedOct 17, 2024
edited
Loading

Change Summary

Put type alias logic afterfrom_property.

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-actionsgithub-actionsbot added the relnotes-fixUsed for bugfixes. labelOct 17, 2024
@codspeed-hqCodSpeed HQ
Copy link

codspeed-hqbot commentedOct 17, 2024
edited
Loading

CodSpeed Performance Report

Merging#10643 willnot alter performance

Comparingkc0506:tweak-type-alias (5ebb0ed) withmain (7bb0e0a)

Summary

✅ 44 untouched benchmarks

@sydney-runkle
Copy link
Contributor

@Viicos, could you take a look at this one? You've had your head in this space recently...

@github-actionsGitHub Actions
Copy link
Contributor

github-actionsbot commentedOct 17, 2024
edited
Loading

Coverage report

Click to see where and how coverage changed

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

This report was generated bypython-coverage-comment-action

Comment on lines +1041 to +1042
if isinstance(origin, TypeAliasType):
return self._type_alias_type_schema(obj)
Copy link
Member

Choose a reason for hiding this comment

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

Why was it moved?

Copy link
ContributorAuthor

@kc0506kc0506Oct 17, 2024
edited
Loading

Choose a reason for hiding this comment

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

I think without a special reason (e.g.dataclass above), these matching clauses should better be put together to make things clearer. Looks like whenorigin is of typeTypeAliasType,from_property is alwaysNone (at least in the current tests), so moving it does not have any actual effect.

@sydney-runklesydney-runkle added the awaiting author revisionawaiting changes from the PR author labelOct 17, 2024
@ViicosViicosenabled auto-merge (squash)October 17, 2024 10:16
@ViicosViicos merged commitfcea8ee intopydantic:mainOct 17, 2024
61 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ViicosViicosViicos approved these changes

Assignees
No one assigned
Labels
awaiting author revisionawaiting changes from the PR authorrelnotes-fixUsed for bugfixes.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@kc0506@sydney-runkle@Viicos

[8]ページ先頭

©2009-2025 Movatter.jp