Optional Field wrongly report 'Parameter x unfilled'
See original GitHub issueTo Reproduce
class Test(BaseModel):
name: Optional[str] = Field()
def test_model() -> None:
a = Test()
print(a.name) # output None
Expected behavior No warning
Screenshots
Environments:
- IDE: PyCharm 2022.1 (Professional Edition)
- OS: Ubuntu 21.10
- Pydantic Version: 1.9.0
- Plugin version: 0.3.12
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:7 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Tested it now, works, thanks! Closing.
thanks for the fix @koxudaxi! 🚀