-
Notifications
You must be signed in to change notification settings - Fork 625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tox doesn't run mypy on the sdk code #773
Comments
This issue was marked stale due to lack of activity. It will be closed in 30 days. |
it'd be nice if we upgraded mypy to > 0.930 so that it can install typed_ast > 1.5.0 - so that this project can work natively on M1. As it stands now it fails to run because typed_ast@1.4.3 doesn't compile on M1. |
Thanks for the suggestion @flyinprogrammer, I've created a separate issue to track that, would you be interested in submitting a PR for it? |
i want to be the hero you're looking for, i think it's gonna take me a minute though 🥲 |
Does it run now? As it seems, we have upgraded version of mypy to >0.930 |
We would need first to run diff --git a/tox.ini b/tox.ini
index ce3733729..1b712b030 100644
--- a/tox.ini
+++ b/tox.ini
@@ -96,7 +96,7 @@ setenv =
; i.e: CONTRIB_REPO_SHA=dde62cebffe519c35875af6d06fae053b3be65ec tox -e <env to test>
CONTRIB_REPO_SHA={env:CONTRIB_REPO_SHA:"main"}
CONTRIB_REPO="git+https://github.com/open-telemetry/opentelemetry-python-contrib.git@{env:CONTRIB_REPO_SHA}"
- mypy: MYPYPATH={toxinidir}/opentelemetry-api/src/:{toxinidir}/tests/opentelemetry-test-utils/src/
+ mypy: MYPYPATH={toxinidir}/opentelemetry-api/src/:{toxinidir}/opentelemetry-sdk/src/:{toxinidir}/tests/opentelemetry-test-utils/src/
changedir =
api: opentelemetry-api/tests
@@ -195,7 +195,7 @@ commands =
opentelemetry: pytest {posargs}
coverage: {toxinidir}/scripts/coverage.sh
- mypy: mypy --install-types --non-interactive --namespace-packages --explicit-package-bases opentelemetry-api/src/opentelemetry/
+ mypy: mypy --install-types --non-interactive --namespace-packages --explicit-package-bases opentelemetry-api/src/opentelemetry/ opentelemetry-sdk/src/opentelemetry/sdk/
; For test code, we don't want to enforce the full mypy strictness
mypy: mypy --install-types --non-interactive --namespace-packages --config-file=mypy-relaxed.ini opentelemetry-api/tests/ I tried running |
Currently,
tox.ini
only has mypy running on the api, so the sdk is not covered in CI:opentelemetry-python/tox.ini
Lines 254 to 260 in 2ad9f49
See the commands in an example run:
The text was updated successfully, but these errors were encountered: