python/mypy

Unpack forces all optional args

Closed this issue · 1 comments

Tried to use this method to type my kwargs:
microsoft/pylance-release#2541 (comment)

it produced some mypy bug:
microsoft/pylance-release#2541 (comment)

I also opened a bug for pylance:
microsoft/pylance-release#6732 (comment)

As Eric explained in microsoft/pylance-release#2541 (comment), mypy is behaving correctly. You can mark the field as NotRequired or specify total=False if you want the field to not be required.