Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.2k
FixIncEx
type alias definition#10339
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
cloudflare-workers-and-pagesbot commentedSep 6, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Deploying pydantic-docs with |
Latest commit: | 5ab7f38 |
Status: | ✅ Deploy successful! |
Preview URL: | https://fa7af8a1.pydantic-docs.pages.dev |
Branch Preview URL: | https://inc-ex-ann.pydantic-docs.pages.dev |
pydantic/main.py Outdated
# Keep these type aliases available at runtime: | ||
TupleGenerator: TypeAlias = Generator[Tuple[str, Any], None, None] | ||
# Keep this type alias in sync with the stub definition in `pydantic-core`: | ||
IncEx: TypeAlias = 'set[int] | set[str] | dict[int, IncEx | bool] | dict[str, IncEx | bool]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I removed the| None
and added it in the relevant method signatures, as it makes more sense imo to keep the type alias scoped to what it represents, and then have consumers of this type alias make it optional or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Good call.
codspeed-hqbot commentedSep 6, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
CodSpeed Performance ReportMerging#10339 willnot alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks good. What happened toModelT
?
pydantic/main.py Outdated
# Keep these type aliases available at runtime: | ||
TupleGenerator: TypeAlias = Generator[Tuple[str, Any], None, None] | ||
# Keep this type alias in sync with the stub definition in `pydantic-core`: | ||
IncEx: TypeAlias = 'set[int] | set[str] | dict[int, IncEx | bool] | dict[str, IncEx | bool]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Good call.
I moved it just above the |
cdca7ae
intomainUh oh!
There was an error while loading.Please reload this page.
Coverage reportClick to see where and how coverage changed
This report was generated bypython-coverage-comment-action |
Change Summary
Fixes#10333
Requirespydantic/pydantic-core#1443
Ideally we would import
_IncEx
frompydantic-core
, but some external tools requires these annotations to be available at runtime :/Checklist