José Duarte
08/24/2022, 7:55 AMvalue: NonNullableType = None
? I understand the motivation behind it but in the end, the type is wrong and mypy will complain. Is there a setting for mypy I am missing?Jeremiah
08/24/2022, 10:06 PMNonNullableType
is actually Optional[NonNullableType]
. Perhaps you are running mypy with the --no-implicit-optional
flag, which disables this type of inference? (docs).
Interestingly, mypy is currently evaluating a two-year-old proposal to make -noo-implicit-optional
the default, but it has not been done yet AFAIK