pyrefly icon indicating copy to clipboard operation
pyrefly copied to clipboard

Feature: inheritance checks for typed dictionaries

Open yangdanny97 opened this issue 9 months ago • 2 comments

These have special override/inheritance semantics

typeddicts have rules for redefining fields to add/remove qualifiers like ReadOnly, preventing conflicting field definitions from parents in multiple inheritance, etc.

There are two sub-tasks, either of which could be a good first issue:

  • general typeddict inheritance rules: https://typing.python.org/en/latest/spec/typeddict.html#inheritance
  • typeddict readonly inheritance rules: https://typing.python.org/en/latest/spec/typeddict.html#id3

Probably requires some special handling in this function: https://github.com/facebook/pyrefly/blob/9da3818099c6b0063a281b0a3ceb054363ad1de0/pyrefly/lib/alt/class/class_field.rs#L1057

yangdanny97 avatar Mar 28 '25 01:03 yangdanny97

Hey! I would like to work on this.

krikera avatar May 31 '25 06:05 krikera

@krikera great! let me know if you get stuck or have any questions :)

yangdanny97 avatar May 31 '25 12:05 yangdanny97

This issue has someone assigned, but has not had recent activity for more than 2 weeks.

If you are still working on this issue, please add a comment so everyone knows. Otherwise, please unassign yourself and allow someone else to take over.

Thank you for your contributions!

github-actions[bot] avatar Jul 09 '25 00:07 github-actions[bot]

Marking this as up for grabs since there hasn't been any progress. If you're still working on it I could assign this back

yangdanny97 avatar Jul 15 '25 14:07 yangdanny97

I believe this is complete based on the latest conformance results https://github.com/facebook/pyrefly/blob/main/conformance/third_party/results.json

yangdanny97 avatar Nov 13 '25 15:11 yangdanny97