You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pydantic nested dict in RootModel does not validate correctly #2819
This works without issues with pydantic and I dont see any actual errors in the typing, however pyrefly reports
ERROR Argument `RootModel[dict[str, InnerModel]]` is not assignable to parameter `data` with type `Mapping[str, Any] | RootModel[Mapping[str, Any]]` in function `OuterModel.__init__` [bad-argument-type]
--> test.py:16:28
|
16 | return OuterModel(data=d)
| ^
|
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
This issue has someone assigned, but has not had recent activity for more than 2 weeks.
If you are still working on this issue, please add a comment so everyone knows. Otherwise, please unassign yourself and allow someone else to take over.
Activity
migeed-z commentedon Mar 17, 2026
Thank you for the report. I will take a look!
github-actions commentedon Apr 9, 2026
This issue has someone assigned, but has not had recent activity for more than 2 weeks.
If you are still working on this issue, please add a comment so everyone knows. Otherwise, please unassign yourself and allow someone else to take over.
Thank you for your contributions!
Make handling generic classes consistent