-
Notifications
You must be signed in to change notification settings - Fork 624
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
Add type checker #3116
base: main
Are you sure you want to change the base?
Add type checker #3116
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I started with this instrumentation because it was the easiest I found to prove that the setup works. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -391,6 +391,7 @@ envlist = | |
generate-workflows | ||
shellcheck | ||
ruff | ||
typecheck | ||
|
||
[testenv] | ||
test_deps = | ||
|
@@ -657,7 +658,6 @@ deps = | |
util-http: -r {toxinidir}/util/opentelemetry-util-http/test-requirements.txt | ||
util-http: {toxinidir}/util/opentelemetry-util-http | ||
; FIXME: add coverage testing | ||
; FIXME: add mypy testing | ||
allowlist_externals = | ||
sh | ||
|
||
|
@@ -963,3 +963,13 @@ deps = | |
pre-commit | ||
commands = | ||
pre-commit run --color=always --all-files {posargs} | ||
|
||
[testenv:typecheck] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I would say we can use the name of the tool here, like mypy or pyright. For example: .github/workflows/misc_0.yml There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But... The |
||
deps = | ||
-c {toxinidir}/dev-requirements.txt | ||
pyright | ||
{[testenv]test_deps} | ||
{toxinidir}/opentelemetry-instrumentation | ||
{toxinidir}/util/opentelemetry-util-http | ||
commands = | ||
pyright |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed. I didn't because I don't know who is using it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's no usage on this repo. But we are using mypy in core + a basic setup of pyright with typeCheckingMode off.