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

tokens: avoid surplus detokenising #42

Merged
merged 2 commits into from
Jan 25, 2024

Conversation

oliver-sanders
Copy link

@oliver-sanders oliver-sanders commented Jan 23, 2024

Pass tokens objects a bit deeper into the code to avoid unnecessary detokenisation / string formatting.

@@ -214,7 +214,7 @@ def satisfy_me(self, outputs: Iterable['Tokens']) -> Set[str]:
prereq = output.to_prereq_tuple()
if prereq not in self.satisfied:
continue
valid.add(output.relative_id_with_selectors)
Copy link
Author

Choose a reason for hiding this comment

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

This avoids detokenising in regularly called code.

Copy link
Owner

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

cylc/flow/task_proxy.py Outdated Show resolved Hide resolved
@hjoliver hjoliver merged commit ce2065b into hjoliver:cylc-set-task Jan 25, 2024
23 checks passed
@oliver-sanders oliver-sanders deleted the cylc-set-task branch January 25, 2024 09:25
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