Skip to content
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

Refactor command arguments in the Python traces #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LanderOtto
Copy link
Contributor

This command changes the retrieval of the arguments in the Python traces. Before this commit, the arguments of the ports (e.g. data produced by a previous step) and the static one (e.g. the option flag of a command) were two different lists and merged together in the _exec function. Now, a list is used where each element is a tuple boolean and string. The boolean indicates if the string is the name of a port.

@LanderOtto LanderOtto force-pushed the refactor-args branch 2 times, most recently from 0c9d55c to bfddb04 Compare July 7, 2024 17:32
…it, the arguments from the port and the static arguments were two different list and merged together. Now, a list is used where each element is a tuple `bool` and `str`. The boolean indicates if the str is the name of a port.
for i, arg in enumerate(step.arguments)
if isinstance(arg, Port)
arguments = [
(arg.name, True) if isinstance(arg, Port) else (arg, False)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
(arg.name, True) if isinstance(arg, Port) else (arg, False)
(arg.name, isinstance(arg, Port))

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