question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Optional Field wrongly report 'Parameter x unfilled'

See original GitHub issue

To Reproduce

class Test(BaseModel):
    name: Optional[str] = Field()


def test_model() -> None:
    a = Test()
    print(a.name)  # output None

Expected behavior No warning

Screenshots image

Environments:

  • IDE: PyCharm 2022.1 (Professional Edition)
  • OS: Ubuntu 21.10
  • Pydantic Version: 1.9.0
  • Plugin version: 0.3.12

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
Andriodencommented, Dec 16, 2022

Tested it now, works, thanks! Closing.

0reactions
josecsotomoralescommented, Dec 16, 2022

thanks for the fix @koxudaxi! 🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - PyCharm says unfilled parameters even though all ...
However, when I call that function with only one parameter (as all of the parameters are optional), PyCharm says that there are unfilled...
Read more >
Issues · koxudaxi/pydantic-pycharm-plugin
This plugin provides autocompletion, inspection, type-checking, inserting unfilled argument, and more. - Issues · koxudaxi/pydantic-pycharm-plugin.
Read more >
PythonTA Checks
PythonTA Checks . This page describes in greater detail the errors that PythonTA checks for. If anything is unclear, incorrect, or missing,...
Read more >
False positive; parameter 'x' unfilled (when attr default as ...
False positive; parameter 'x' unfilled (when attr default as decorator and inheritance). Affects version 2019.1 RC. from typing import * from attr import ......
Read more >
National Defense Authorization Act for Fiscal Year 2020
Modification of required elements of annual reports on emergency and extraordinary expenses of the Department of Defense. Subtitle B--Counterdrug Activities ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found