Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Unexpected argument' warning when ConfigDict(extra="allow") #983

Open
andreeas26 opened this issue Sep 5, 2024 · 0 comments
Open

'Unexpected argument' warning when ConfigDict(extra="allow") #983

andreeas26 opened this issue Sep 5, 2024 · 0 comments

Comments

@andreeas26
Copy link

Describe the bug
'Unexpected argument' warning when the pydantic model is configured to received extra parameters. The guys from pycharm send me here: pycharm issue link

To Reproduce
Define a pydantic model with model_config = ConfigDict(extra="allow"). Initialize the object with an extra parameter that its not defined in the mode.

Expected behavior
There should be no warning for extra parameter, or at least a different warning.

Screenshots
Screenshot 2024-08-29 at 11 14 05

Environments (please complete the following information):

  • IDE: PyCharm 2024.2.1 (Professional Edition)
  • OS: Sonoma 14.6.1
  • Pydantic Version: 2.4.2
  • Plugin version: 0.4.15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant