Skip to content

Add more precise typing to transformation functions#609

Closed
majosm wants to merge 1 commit into
inducer:mainfrom
majosm:fix-transform-result-types
Closed

Add more precise typing to transformation functions#609
majosm wants to merge 1 commit into
inducer:mainfrom
majosm:fix-transform-result-types

Conversation

@majosm
Copy link
Copy Markdown
Collaborator

@majosm majosm commented Jun 16, 2025

Changes transformation functions to return as specific a type as possible. This helps avoid having to add casts in code that calls these functions, e.g.:

dag = cast("DictOfNamedArrays", pt.tag_all_calls_to_be_inlined(dag))
dag = cast("DictOfNamedArrarys", pt.inline_calls(dag))

becomes

dag = pt.tag_all_calls_to_be_inlined(dag)
dag = pt.inline_calls(dag)

@majosm majosm force-pushed the fix-transform-result-types branch from 7451684 to 7c9a8d9 Compare June 16, 2025 20:12
@majosm majosm marked this pull request as ready for review June 16, 2025 20:30
@majosm majosm requested a review from inducer June 16, 2025 20:30
@inducer inducer closed this in #610 Jun 24, 2025
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.

1 participant