Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 655: Improve TypedDict typing #590

Open
Tracked by #56
raman325 opened this issue Feb 20, 2023 · 2 comments
Open
Tracked by #56

PEP 655: Improve TypedDict typing #590

raman325 opened this issue Feb 20, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@raman325
Copy link
Contributor

raman325 commented Feb 20, 2023

TypedDict's have a Required and NotRequired type that can be used to explicitly mark fields as optional versus not. This is standard in python 3.11 but must be imported via typing_extensions in python 3.10. All TypedDict's should use these new types which will require a review of zwave-js-server and node-zwave-js because I believe we have commented that more fields are optional than there actually are

https://peps.python.org/pep-0655/

Needs pydantic/pydantic#5584

@raman325 raman325 changed the title Improved TypedDict typing PEP 655: Improve TypedDict typing Feb 20, 2023
@raman325 raman325 added wanted-feature enhancement New feature or request and removed wanted-feature labels Feb 20, 2023
This was referenced Mar 22, 2023
@raman325
Copy link
Contributor Author

@MartinHjelmare FYI we can't properly implement this until pydantic releases a fix for pydantic/pydantic#3859

@MartinHjelmare
Copy link
Contributor

Ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants