Skip to content

Refactor command arguments in the Python traces#17

Open
LanderOtto wants to merge 1 commit intomasterfrom
refactor-args
Open

Refactor command arguments in the Python traces#17
LanderOtto wants to merge 1 commit intomasterfrom
refactor-args

Conversation

@LanderOtto
Copy link
Copy Markdown
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
Copy Markdown
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