Test third-party stubs in isolation #6229
Merged
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.
This is a first step towards #5952. For each third-party distribution, a separate mypy call is started. This has a few advantages, but also a few drawbacks:
METADATA.toml
are now spotted, since only the dependencies listed there are being added to the list of files to test.METADATA.toml
. Previously, all configurations were merged before mypy was run, therefore all configurations applied to all files. Now, only the configurations of a distribution and its dependencies are merged when testing a distribution.In the future, each distribution should get its own venv, so that the dependencies can be installed from pypi. See #5952 for the rationale.
The code in
mypy_test.py
is quite janky and hard to read at this point. I wanted to keep refactorings out of this PR, but might send a separate cleanup PR later.