false positive bad-argument-type with dict
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 516
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the Bug
NOTICE: same is value used in both `invalid()` and `valid()`.
```python
from collections.abc import Mapping
from pydantic import BaseModel
from pydantic.types import JsonValue
class EscalationChainState(BaseModel):
@classmethod
def regen_text(cls, meta: Mapping[str, JsonValue]) -> None: ...
def invalid() -> None:
meta = {"owner": {"name": "Alice"}, "zone": {"name": "B2"}}
EscalationChainState.regen_text(meta) # pyrefly: ignore [bad-argument-type]
def valid() -> None:
EscalationChainState.regen_text(
{"owner": {"name": "Alice"}, "zone": {"name": "B2"}}
)
```
possibly related to #3160
### Sandbox Link
_No response_
### (Only applicable for extension issues) IDE Information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.