Skip to content

Fix check input type bug for parameterized tuples#1582

Open
ArnavBalyan wants to merge 1 commit into
apache:mainfrom
ArnavBalyan:arnavb/fix-check-input-type
Open

Fix check input type bug for parameterized tuples#1582
ArnavBalyan wants to merge 1 commit into
apache:mainfrom
ArnavBalyan:arnavb/fix-check-input-type

Conversation

@ArnavBalyan
Copy link
Copy Markdown
Member

Changes

  • The runtime type checker rejects parameterized tuples and new type alias, leading to type mismatch errors at execute time.
  • The internal type check wrongly returns false for parameterized tuples/dicts.
  • Fix by switching to the standard library origin check and per position matching for fixed length tuples. Also unwrapping the alias and recursing on the underlying type.
  • Closes check_input_type rejects parameterized tuple annotations and PEP 695 type aliases #1550.

How I tested this

  • UT

Notes

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

check_input_type rejects parameterized tuple annotations and PEP 695 type aliases

1 participant