-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Describe the bug
This feels related to #340, but after upgrading to v0.4.16, I'm getting errors in Pycharm related to having mutable default values. This is perfectly fine to do in Pydantic: https://docs.pydantic.dev/latest/concepts/fields/#mutable-default-values
To Reproduce
Steps to reproduce the behavior:
- Create a basic pydantic class that has a mutable default:
from typing import Any
from pydantic import BaseModel, Field
class MyModel(BaseModel):
my_attr: dict[str, Any] = {
"x": 1
}
Hover over; Pycharm shows as error:

Expected behavior
This should not be an error. Or really even a warning.
Environments (please complete the following information):
- IDE: PyCharm 2024.3.1
- OS: MacOS 14.2.1
- Pydantic Version 2.10.3
- Plugin version 0.4.16
Metadata
Metadata
Assignees
Labels
No labels