Skip to content

Conversation

sydney-runkle
Copy link
Contributor

@sydney-runkle sydney-runkle commented Jun 25, 2024

Closes #9536
Fix #9744

@github-actions github-actions bot added the relnotes-fix Used for bugfixes. label Jun 25, 2024
Copy link

cloudflare-workers-and-pages bot commented Jun 25, 2024

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8e76348
Status: ✅  Deploy successful!
Preview URL: https://88a4505b.pydantic-docs.pages.dev
Branch Preview URL: https://validate-call-fix.pydantic-docs.pages.dev

View logs

Copy link

codspeed-hq bot commented Jun 25, 2024

CodSpeed Performance Report

Merging #9760 will not alter performance

Comparing validate_call_fix (8e76348) with main (04f3a46)

Summary

✅ 13 untouched benchmarks

@sydney-runkle sydney-runkle requested a review from alexmojaki June 26, 2024 12:59
globs,
)
max = globs['max']
assert len(max.__type_params__) == 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any way to test that validate_call is actually using/seeing T?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, I don't think it is: #7796

Which I think is something we can fix separately with the issue above

Copy link
Contributor

Choose a reason for hiding this comment

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

but is there a type param in the pydantic schema or something? or is it replaced with Any?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It has an arguments schema with an Any for the item type

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In a sense this PR is a bit silly, bc we're fixing the syntax for something that doesn't work, but it at least sets the stage to get the type params in accessible places.

@sydney-runkle sydney-runkle merged commit fcd2010 into main Jun 26, 2024
@sydney-runkle sydney-runkle deleted the validate_call_fix branch June 26, 2024 16:02
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
2 participants