You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
error: "Type[None]" has no attribute "__bool__" #11539
Activity
sobolevn commentedon Nov 13, 2021
We need to add something like
mypy/mypy/checkmember.py
Lines 323 to 329 in 8f281fb
but for
Type[None], PR is on its way! 👍KotlinIsland commentedon Nov 14, 2021
Would it make sense to use typesheds
_typeshed.NoneTypefor analysis instead of hardcoding it into the typechecker?sobolevn commentedon Nov 14, 2021
_typeshed.NoneTypeis not standartized. We cannot use it yet 😞erictraut commentedon Nov 14, 2021
FWIW, pyright uses
_typeshed.NoneType.sobolevn commentedon Nov 14, 2021
@erictraut do you use any other
_typeshedtypes? 🤔erictraut commentedon Nov 14, 2021
That's the only symbol from
_typeshed. We also use_TypedDictfromtyping, which predates_typeshedbut should maybe be moved there.emmatyping commentedon Jun 8, 2022
I think we should probably use
_typeshed.NoneTypeortypes.NoneTypein 3.10+ (which_typeshed.NoneTypealready handles).If someone wants to make a PR changing mypy to leverage the
_typeshedcode, I'd be happy to review it.KotlinIsland commentedon Jun 9, 2022
_typeshed.NoneTypefor the type ofNone#11287