home-assistant-libs / home-assistant-libs/zwave-js-server-python

PEP 655: Improve TypedDict typing

Open
#590 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
63
Forks
26
Avg merge
13h 14m
Merged PRs (30d)
10

Description

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 https://github.com/pydantic/pydantic/issues/5584

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the TypedDict definitions and their current optionality in zwave-js-server and node-zwave-js, using PEP 655 as the specification. Confirm whether pydantic issue 5584 still blocks the work. Done means all TypedDict fields use Required or NotRequired where appropriate and the declared optional fields match the server behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.