-
Notifications
You must be signed in to change notification settings - Fork 146
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
feat(frontend-python): module run are scheduled and parallelized in a… #1144
base: main
Are you sure you want to change the base?
Conversation
0e73056
to
4f5070a
Compare
4f5070a
to
70998db
Compare
self, | ||
*args: Optional[Union[Value, Tuple[Optional[Value], ...]]], | ||
) -> Union[Value, Tuple[Value, ...]]: | ||
) -> Any: |
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.
Note if you have better way to force pyling to force return type to Union[Value, Tuple[Value, ...]]
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.
Hmm probably you have to do something in this spirit:
output = self._run(True, *args)
assert(isinstance(output, Union[Value, Tuple[Value, ...]])
And pylint will be happy after that ....
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.
Yeah, it's unfortunate that typing.overload
doesn't support specifying overloads based on specific values.
self, | ||
sync: bool, | ||
*args: Optional[Union[Value, Tuple[Optional[Value], ...]]], | ||
) -> Union[Value, Tuple[Value, ...], Future]: |
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.
You can be more specific in the Future type
self, | ||
*args: Optional[Union[Value, Tuple[Optional[Value], ...]]], | ||
) -> Union[Value, Tuple[Value, ...]]: | ||
) -> Any: |
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.
Yeah, it's unfortunate that typing.overload
doesn't support specifying overloads based on specific values.
… worker pool