Skip to content

Add unify rule for Operation with Callable#679

Merged
jfeser merged 2 commits into
masterfrom
eb-unify-operation-callable
Jun 10, 2026
Merged

Add unify rule for Operation with Callable#679
jfeser merged 2 commits into
masterfrom
eb-unify-operation-callable

Conversation

@eb8680

@eb8680 eb8680 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #669

This PR adds a case in unify to handle unifying Operation and Callable, and a few tests including a regression test based on the example in the original issue.

@eb8680 eb8680 requested a review from jfeser June 10, 2026 14:03
and issubclass(subtyp, typing.get_origin(typ))
):
return subs # implicit expansion to subtyp[Any]
elif isinstance(typ, GenericAlias):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is from @jfeser in #656

@jfeser jfeser merged commit b68a742 into master Jun 10, 2026
29 checks passed
@jfeser jfeser deleted the eb-unify-operation-callable branch June 10, 2026 20:25
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.

Operation should unify with Callable

2 participants