8000 Support usage of `type` with `typing.Self` and type aliases by kc0506 · Pull Request #10621 · pydantic/pydantic · GitHub
[go: up one dir, main page]

Skip to content

Support usage of type with typing.Self and type aliases #10621

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 19 commits into from
Oct 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix broken test again
  • Loading branch information
kc0506 committed Oct 17, 2024
commit 57a20041d0edb86ca41d18fb7edecb72e9ffccbf
2 changes: 1 addition & 1 deletion tests/test_types_self.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def self_types1(self) -> List[Type[Self]]:

# make sure forward refs are supported:
@computed_field
def self_types2(self) -> list[type['Self']]:
def self_types2(self) -> List[Type['Self']]:
return [type(self), self.self_type]

@computed_field
Expand Down
Loading
0