Skip to content

Conversation

@Armavica
Copy link
Member

@Armavica Armavica commented Dec 17, 2025

Description

Related Issue

  • Closes #
  • Related to #

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

cloned_outputs: list[Variable] | Variable | Out | list[Out]
if isinstance(outputs, list):
cloned_outputs = []
cloned_outputs_list = []
Copy link
Contributor

Choose a reason for hiding this comment

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

Can cloned_outputs just be used?

Copy link
Member Author

Choose a reason for hiding this comment

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

It wouldn't be type-stable and mypy doesn't like it. The problem is that if you declare it as list[T] | T it won't let you redeclare it as list[T].

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.

2 participants