More typing annotations for ninjabackend.py#15791
Open
bonzini wants to merge 33 commits intomesonbuild:masterfrom
Open
More typing annotations for ninjabackend.py#15791bonzini wants to merge 33 commits intomesonbuild:masterfrom
bonzini wants to merge 33 commits intomesonbuild:masterfrom
Conversation
There's still some additional issues, but, this reduces some of the low hanging issues. Also, uses a TypeAlias for the Literal to avoid duplication
This allows each child instance to override 'auto' for itself, without the parent knowing about them
These extract BothLibraries essentially, but need different logic for link_with and link_whole, as the latter cannot have shared_libraries or executables (generally).
This allows mypy to realize that `get` will not in fact return an invalid type.
The problem with list is invariance. These also don't suffer from the string problem, so we don't have to deal with the str == Iterable[str] problem.
Files and ExtractedObjects are also not valid.
The typing is quite complex, but seems to work. This also helps resolve the fact that Executable's are actually linkable on Windows (and required in some cases) at this level.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This fixes some complaints from mypy about extra being (possibly) passed via both **options and the explicit keyword arguments. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
…ra_rpaths Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Just enough to stop mypy from reporting errors about Any. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Fix mesonbuild/backend/ninjabackend.py:1822:33: error: "BuildTarget" has no attribute "get" [attr-defined] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
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.
Down to 50 errors.