Skip to content

"Parameter unfilled" in constructor when using private fields #1068

@Xiddoc

Description

@Xiddoc

Describe the bug
When using private fields in BaseModels, the plugin incorrectly suggests that constructors must add this field as a parameter.

To Reproduce
Steps to reproduce the behavior:

from pydantic import BaseModel

class Test(BaseModel):
    _a: int

print(Test())  # Observe warning here from plugin: "Parameter '_a' unfilled"

Expected behavior
Ignoring this parameter in the constructor.

Screenshots

Image

Environments (please complete the following information):

  • IDE: PyCharm 2025.1.2
  • OS: Windows 10
  • Pydantic Version: 2.11.7
  • Plugin version: 0.4.18

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions