Skip to content
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

Fix the py.typed marker file usage #4172

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/misc_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,24 @@ jobs:
- name: Run tests
run: tox -e mypyinstalled

pyright:
name: pyright
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e pyright

docs:
name: docs
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

- Removed superfluous py.typed markers and added them where they were missing
([#4172](https://github.com/open-telemetry/opentelemetry-python/pull/4172))
- Include metric info in encoding exceptions
([#4154](https://github.com/open-telemetry/opentelemetry-python/pull/4154))
- sdk: Add support for log formatting
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file removed opentelemetry-api/py.typed
Empty file.
Empty file removed opentelemetry-proto/py.typed
Empty file.
Empty file removed opentelemetry-sdk/py.typed
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ exclude = '''
[tool.pytest.ini_options]
addopts = "-rs -v"
log_cli = true

[tool.pyright]
typeCheckingMode = "off"
reportMissingTypeStubs = "error"
include = [
"opentelemetry-api/src",
"opentelemetry-sdk/src",
"opentelemetry-semantic-conventions/src",
]
1 change: 1 addition & 0 deletions pyright-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyright==1.1.381
16 changes: 16 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ envlist =
spellcheck
tracecontext
mypy,mypyinstalled
pyright
docs
docker-tests-proto{3,4}
public-symbols-check
Expand Down Expand Up @@ -445,3 +446,18 @@ commands_pre =

commands =
sh -c "find {toxinidir} -name \*.sh | xargs shellcheck --severity=warning"

[testenv:pyright]
basepython: python3

allowlist_externals = pyright

commands_pre =
pip install -r {toxinidir}/pyright-requirements.txt \
-e {toxinidir}/opentelemetry-api \
-e {toxinidir}/opentelemetry-semantic-conventions \
-e {toxinidir}/opentelemetry-sdk

commands =
pyright --version
pyright