pydantic.create_model + **fields fails when fields is explicitly typed
Open
needs-discussion
pydantic
stale
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 516
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the Bug
Direct create_model('M', x=(int, ...)) is fine, but create_model('M', **fields) fails when fields is annotated.
```py
from typing import Any
from pydantic import create_model
fields: dict[str, tuple[type[Any], Any]] = {"x": (int, ...)}
M = create_model("M", **fields)
```
pyrefly output (pyrefly 0.49.0):
- No matching overload found for function pydantic.main.create_model
called with arguments: (Literal['M'], **dict[str, tuple[type[Any],
Any]])
### Sandbox Link
_No response_
### (Only applicable for extension issues) IDE Information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.