Closed
Conversation
Contributor
|
This is awesome! I get a lot of errors from typeguard when I run this even on a small subset of the tests (metrics haha). How should we slowly enforce this as to not block and fail the CI, or not having to perform a mass fixing of the tests? |
Member
Author
If we do go this route, one option is to fix the tests incrementally in this PR. Even after getting all the tests working, there other problems (e.g. spurious failures for context manager type checks) preventing us from merging this PR though. |
Member
|
closing for now due to different priorities, we'll bring this back to an issue (#721) for others to take on. |
srikanthccv
pushed a commit
to srikanthccv/opentelemetry-python
that referenced
this pull request
Nov 1, 2020
…y#317) closes open-telemetry#316 Signed-off-by: Olivier Albertini <olivier.albertini@montreal.ca>
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.
Inspired by #258 (comment). It would be great to use our existing type annotations in tests at runtime. I.e., without annotating the tests themselves. Hopefully this uncovers some false-positive tests.
This uses typeguard to do runtime checking via an import hook, which should earmark all
opentelemetrycode for checking.This PR is very experimental, and may not be a good approach. Caveat reviewer!