Skip to content

Improve type validation to handle bare typing objects #8874

Closed
@sjrl

Description

@sjrl

Is your feature request related to a problem? Please describe.
Our current type validation used when validating pipeline connections doesn't support comparison of bare types. For example, List[Any] does not get matched to List even though it should.

Describe the solution you'd like
Update the function such that we can handle bare types. For example, this code

    # If either is a bare type (no args), treat it as if it had Any
    if not sender_args:
        sender_args = (Any,)
    if not receiver_args:
        receiver_args = (Any,) * len(sender_args)

could be used such that any bare types are given Any as arguments.

Alternatively we can look for existing type comparison solutions that probably exist in other libraries that handles this already.

Describe alternatives you've considered
Leave as is and probably document that we don't properly support bare types.

Metadata

Metadata

Assignees

Labels

P3Low priority, leave it in the backlog

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions