Skip to content

Conversation

sydney-runkle
Copy link
Contributor

@sydney-runkle sydney-runkle commented Nov 20, 2024

Following up on #10678 (comment)

cc @Viicos, breaking for this case: #10905 (comment)

I think moving inside here makes sense. Though, I understood your original point in the comment 👍

Fixes #10912

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

cloudflare-workers-and-pages bot commented Nov 20, 2024

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: dcfe613
Status: ✅  Deploy successful!
Preview URL: https://1e3f818a.pydantic-docs.pages.dev
Branch Preview URL: https://validated-data-fix.pydantic-docs.pages.dev

View logs

Copy link

codspeed-hq bot commented Nov 20, 2024

CodSpeed Performance Report

Merging #10909 will not alter performance

Comparing validated-data-fix (dcfe613) with main (36642e6)

Summary

✅ 46 untouched benchmarks

Copy link
Contributor

github-actions bot commented Nov 20, 2024

Coverage report

This PR does not seem to contain any modification to coverable code.

@sydney-runkle sydney-runkle changed the title Maybe fix issue with validated data missing Relax check for validated data in default factory utils Nov 21, 2024
Copy link
Member

@Viicos Viicos left a comment

Choose a reason for hiding this comment

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

We just need to also modify the first overload to be:

    @overload
def get_default(self, *, call_default_factory: Literal[True], validated_data: dict[str, Any] | None = ...) -> Any: ...

sydney-runkle and others added 4 commits November 21, 2024 09:06
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
@sydney-runkle sydney-runkle enabled auto-merge (squash) November 21, 2024 14:13
@sydney-runkle sydney-runkle merged commit b985365 into main Nov 21, 2024
52 checks passed
@sydney-runkle sydney-runkle deleted the validated-data-fix branch November 21, 2024 14:17
brentyi added a commit to brentyi/tyro that referenced this pull request Nov 21, 2024
sydney-runkle added a commit that referenced this pull request Nov 22, 2024
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
brentyi added a commit to brentyi/tyro that referenced this pull request Nov 23, 2024
…oved error messages (#204)

* Improve mismatched type for StrEnum

* Overhaul subcommand matching

* Additional subcommand matching tests

* Min 3.11 for StrEnum tests

* fix test ignore

* Test nits

* typeguard compatibility

* Add minimum typeguard version

* fix typeguard errors

* typeguard refactor, more subcommand matching tests

* Add 3.13 to CI (fixes #206)

* Add pydantic version exclude, waiting for patch
Related: pydantic/pydantic#10912, pydantic/pydantic#10909

* Improve type warnings + errors

* Generic subcommand example, docs updates

* Remove unused

* `build` => `pytest`, closes #206

* mypy
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.10: validated_data must be provided if call_default_factory is True (affets: SQLModel)
3 participants