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
I feel like we should also wait for the PEP to be accepted. typing-extensions can include experimental features that may be rejected, but typeshed should not.
I've used NotRequired in #8089 and our tests passed. So it seems that pytype at least accepts NotRequired, even if it doesn't fully support it, which would be enough for me. Cc @rchen152 for feedback.
Also cc @pradeep90 and @shannonzhu: Does pyre support Required/NotRequired for TypedDict?
I've used NotRequired in #8089 and our tests passed. So it seems that pytype at least accepts NotRequired, even if it doesn't fully support it, which would be enough for me. Cc @rchen152 for feedback.
Also cc @pradeep90 and @shannonzhu: Does pyre support Required/NotRequired for TypedDict?
@srittau No, we don't yet support Required/NotRequired. I'll implement it by the end of the month.
Since the pytype checks run against the zxcvbn stubs, which already use NotRequired successfully and all other type checkers support it, I'm closing this. 🎉
Activity
JelleZijlstra commentedon Nov 15, 2021
I feel like we should also wait for the PEP to be accepted. typing-extensions can include experimental features that may be rejected, but typeshed should not.
srittau commentedon Dec 22, 2021
This is now fully supported in mypy.
JelleZijlstra commentedon Dec 22, 2021
I think it supports only one of Required and NotRequired? That's what the initial PR said but I haven't verified with the release.
srittau commentedon Dec 22, 2021
Quick tests confirms that it works with both:
gregoiredx commentedon Mar 31, 2022
Hello @srittau, just to let you know you can check the "PEP accepted" checkbox, see https://groups.google.com/g/dev-python/c/odKM_OpDES0 and https://peps.python.org/pep-0655/
srittau commentedon Mar 31, 2022
Thanks, done!
srittau commentedon Jun 17, 2022
I've used
NotRequiredin #8089 and our tests passed. So it seems that pytype at least acceptsNotRequired, even if it doesn't fully support it, which would be enough for me. Cc @rchen152 for feedback.Also cc @pradeep90 and @shannonzhu: Does pyre support
Required/NotRequiredforTypedDict?pradeep90 commentedon Jun 19, 2022
@srittau No, we don't yet support
Required/NotRequired. I'll implement it by the end of the month.lancelote commentedon Jun 30, 2022
Available in PyCharm >= 2022.2 EAP 4 https://youtrack.jetbrains.com/issue/PY-53611/Support-PEP-655-typingRequiredtypingNotRequired-for-TypedDicts
pradeep90 commentedon Jun 30, 2022
Added support in Pyre v0.9.15.
srittau commentedon Jun 30, 2022
Since the pytype checks run against the zxcvbn stubs, which already use
NotRequiredsuccessfully and all other type checkers support it, I'm closing this. 🎉