Repository navigation
Honor call=False in import_executor - #650
Merged
ko3n1g merged 1 commit intoOct 16, 2026
Merged
Conversation
Signed-off-by: Rio Yu <[email protected]>
ko3n1g
approved these changes
Oct 15, 2026
ko3n1g
enabled auto-merge
October 15, 2026 07:51
ko3n1g
disabled auto-merge
October 16, 2026 14:43
Contributor
|
/ok to test a999231 |
ko3n1g
enabled auto-merge
October 16, 2026 14:44
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
import_executor()documents acallflag but ignores it: if the value is callable, it is always called with the remaining kwargs. Soimport_executor("gpu", call=False)returns an executor instead of the factory, and a factory with required arguments raisesTypeError.With this change,
call=Falsereturns the value without calling it, and the docstring notes that kwargs are unused in that case. The defaultcall=Truepath is unchanged. Executor instances are still returned as-is with either flag value, and the return annotation is stillExecutor.Tests
Local results (Linux, Python 3.11):
call=Falseregressions, one of them using a factory with a required argument. The other three are controls for executor instances (with both flag values) and for the default factory call.test_base.py: 2 failed / 19 passed before the fix, 21 passed after.ray.dagimport error; unmodifiedmainprints the same message.ruff checkandruff format --checkpass.