Repository navigation
Declare taskSpec in JobGeneratorThread.runImpl as JediTaskSpec - #884
Merged
Merged
Conversation
runImpl unpacks taskSpec from an element of the input list, and ListWithLock is untyped by design, so no static reader knows the class of taskSpec there: mypy treats it as Any, and none of the method calls on it in runImpl resolve. Declare it. With the type known, mypy checks those calls and finds two mismatches: - JobBroker.getBaseLockID asked for str, but only hands vo and sourceLabel on to FactoryBase.requireImpl, which takes str | None. Widen its parameters to match. - resetUnusedFiles_JEDI and setUseJumboFlag_JEDI take an int, and jediTaskID is a column, declared optional. Ignore those three calls the same way as the lockTask_JEDI calls in the same function. No change at runtime.
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.
taskSpec in runImpl comes from an element of the untyped ListWithLock, so static readers see it as Any and none of the method calls on it resolve. This declares it as JediTaskSpec.
With the type known, mypy checks those calls and finds two mismatches:
No change at runtime.