Skip to content

Conversation

tempusfrangit
Copy link
Member

@tempusfrangit tempusfrangit commented Aug 28, 2025

Convert Input from dataclass to function with overloads following Pydantic's pattern. Maintains exact same syntax for developers while providing full type checker compatibility.

Key changes:

  • Add Input() function with @overload decorators returning Any for type checkers
  • Create FieldInfo dataclass to store field metadata at runtime
  • Update inspector.py to use FieldInfo instead of Input dataclass
  • Add comprehensive test suite (31 unit/functional tests + Go integration)
  • Fix BaseModel inheritance tests with proper type annotations and getattr usage

@tempusfrangit tempusfrangit requested a review from a team as a code owner August 28, 2025 23:30
@tempusfrangit tempusfrangit force-pushed the input-type-checker-fix branch from 397da92 to d0a5df2 Compare August 28, 2025 23:37
@tempusfrangit tempusfrangit force-pushed the input-type-checker-fix branch 5 times, most recently from 6f2525a to 83b7fdd Compare August 29, 2025 06:53
@tempusfrangit tempusfrangit marked this pull request as draft August 29, 2025 06:54
@tempusfrangit tempusfrangit force-pushed the input-type-checker-fix branch 9 times, most recently from 82eab0d to 5ec13f7 Compare August 29, 2025 08:28
Convert Input from dataclass to function with overloads following Pydantic's
pattern. Maintains exact same syntax for developers while providing full
type checker compatibility.
@tempusfrangit tempusfrangit force-pushed the input-type-checker-fix branch from 5ec13f7 to a9572c6 Compare August 29, 2025 08:53
@tempusfrangit tempusfrangit marked this pull request as ready for review August 29, 2025 08:54
@tempusfrangit tempusfrangit requested a review from aron August 29, 2025 08:58
Copy link
Contributor

@aron aron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌 hurrah!

Copy link
Member

@michaeldwan michaeldwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@michaeldwan michaeldwan merged commit cd41c33 into main Aug 29, 2025
31 of 34 checks passed
@michaeldwan michaeldwan deleted the input-type-checker-fix branch August 29, 2025 15:59
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.

3 participants