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
Describe the bug
Using a model with a custom root type makes PyCharm show a warning when instantiating such a model.
To Reproduce
Steps to reproduce the behavior:
from typing import List
from pydantic import BaseModel
class StorageAmountsDB(BaseModel):
"""StorageAmounts model (db)"""
__root__: List = []
def test_root_type():
StorageAmountsDB(__root__=[1])
Expected behavior
It is no problem to provide a __root__ argument.
Screenshots
Environments (please complete the following information):
IDE: PyCharm Professional 2020.3
OS: macOS 10.14
Pydantic Version: 1.7.3
Plugin version: 0.1.17
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
@chbndrhnns
Thank you for creating this issue.
Oh, I'm sorry. It's a bug. I removed the private attribute from the suggestion.
But, I forget that I must exclude __root__. I will fix it.
Describe the bug
Using a model with a custom root type makes PyCharm show a warning when instantiating such a model.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It is no problem to provide a
__root__
argument.Screenshots
Environments (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: