-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ruff and flake8 fixes #16884
Ruff and flake8 fixes #16884
Conversation
@@ -1435,13 +1435,12 @@ def _workflow_to_dict_export(self, trans, stored=None, workflow=None, internal=F | |||
if name: | |||
input_dicts.append({"name": name, "description": annotation_str}) | |||
for name, val in step_state.items(): | |||
input_type = type(val) | |||
if input_type == RuntimeValue: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks so intentional to me - like we did this at some point to avoid ConnectedValue
? I can't find evidence of that in the blame logs though. I think it is fine to keep this as is and just revert if there are problems. If this is actually the check we want - I think ideally we should be using is_runtime_value
, again not a necessary thing though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the insight!
By looking at the implementation of is_runtime_value
:
def is_runtime_value(value):
return isinstance(value, RuntimeValue) or (
isinstance(value, dict) and value.get("__class__") in ["RuntimeValue", "ConnectedValue"]
)
it's clear that it would not avoid ConnectedValue
either.
I don't see a reason to avoid it here, but if there is one, then we would need to revert this change or use if isinstance(val, RuntimeValue) and not isinstance(val, ConnectedValue):
Extracted from the Python 3.12 support PR.
How to test the changes?
(Select all options that apply)
License