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

compute returns dict instead of tuple. #44

Merged
merged 5 commits into from
Aug 31, 2023
Merged

compute returns dict instead of tuple. #44

merged 5 commits into from
Aug 31, 2023

Conversation

YooSunYoung
Copy link
Member

Fixes #27

@@ -37,7 +37,7 @@ def __init__(
def compute(
self,
keys: Optional[
Union[type, Tuple[type, ...], Item[T], Tuple[Item[T], ...]]
Union[type, Tuple[type, ...], Item[T], Tuple[Item[T], ...], None]
Copy link
Member

Choose a reason for hiding this comment

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

Why the None here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah... right! It was meant to be either Optional or Union[type, Tuple[type, ...], Item[T], Tuple[Item[T], ...], None]

Can we use

Union[type, Tuple[type, ...], Item[T], Tuple[Item[T], ...], None]

instead of Optional?

Copy link
Member

Choose a reason for hiding this comment

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

Why do you prefer that?

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 doesn't really matter since they are basically the same.
Just less lines... I guess...? I'll revert it anyways : D

src/sciline/task_graph.py Show resolved Hide resolved
src/sciline/task_graph.py Outdated Show resolved Hide resolved
@YooSunYoung YooSunYoung merged commit 13b079b into main Aug 31, 2023
5 checks passed
@YooSunYoung YooSunYoung deleted the compute-dict branch August 31, 2023 14:12
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.

Return dict when computing multiple results
2 participants