Repository navigation
Type pre/post dependencies as Task and Call sequences - #1096
Open
Hugohong258 wants to merge 1 commit into
Open
Hugohong258 wants to merge 1 commit into
Hugohong258 wants to merge 1 commit into
Conversation
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.
Task.preandTask.postare annotated as strings or lists of strings, but the executor accepts Task/Call dependencies and@task(dependency)stores a tuple. Annotate them as sequences of Task or Call objects. The mypy regression covers mixed tuple/list dependencies, the reported tuple comparison and an invalid-element control that prevents a broad Any annotation from hiding the problem. Fixes #1065. Earlier PR #1093 was closed by its author; this change also adds a type-checking regression and keeps dependency types limited to the objects the executor accepts.Validation: the fixture reports seven errors on the base with both pinned mypy 0.971 and mypy 2.4.0, then passes after the change. On WSL Linux/Python 3.14.4, 109 related task/executor/type tests pass and 1 is skipped. Mixed Task/Call execution-order checks also pass on Windows/Python 3.12.3 and Linux/Python 3.14.4. Black 22.8, Flake8 4 with an external host entry-point API adapter, and pinned mypy over all 48 source files pass. The pinned checker used a Linux/Python 3.9 static target, not a Python 3.9 runtime. The full unit suite, integrations and older-runtime CI matrix were not run. Based on 2.2 per the contribution guide.