Skip to content

oss_31_expand_pyright_typing_scope - #5

Open
ocelotl wants to merge 2 commits into
mainfrom
oss_31_expand_pyright_typing_scope
Open

oss_31_expand_pyright_typing_scope#5
ocelotl wants to merge 2 commits into
mainfrom
oss_31_expand_pyright_typing_scope

Conversation

@ocelotl

@ocelotl ocelotl commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Closes #4

Incrementally widen contrib pyright strict scope (Linear OSS-31, Q2): add opentelemetry-distro to the pyright include (needed only a trivial _configure(self, **kwargs: object) -> None annotation), plus the tox typecheck dep so pyright resolves it. pyright stays green (0 errors). Q5 (coverage-in-CI) deferred with justification (auto-generated workflows + maintainer Codecov token); no plumbing removed. Remaining packages listed for follow-up.

Validation: scope contained to pyproject + tox.ini + distro src + changelog; pyright 0 errors / 0 warnings on the expanded set.

Linear issue: https://linear.app/dash0/issue/OSS-31/q2-q5-typing-program-widen-pyright-scoperigor-wire-coverage-into-ci

Annotate OpenTelemetryDistro._configure and add the package to the
pyright include list and the typecheck tox environment. The package
passes strict pyright cleanly.

Assisted-by: Claude Opus 4.8
@ocelotl

ocelotl commented Jul 22, 2026

Copy link
Copy Markdown
Owner Author

🔒 Internal (dash0) — not for upstream.

@ocelotl

ocelotl commented Jul 22, 2026

Copy link
Copy Markdown
Owner Author

📣 Public-facing draft — to be used for the upstream PR in open-telemetry/opentelemetry-python-contrib. No internal references; copy verbatim.

Title: Add opentelemetry-distro to the pyright strict type-checking scope

What

Extends the pyright strict include by one package (opentelemetry-distro), as part of the incremental widening the config comment already calls for ("Add progressively instrumentation packages here.").

Scope

  • Annotate OpenTelemetryDistro._configure as (self, **kwargs: object) -> None (the only strict finding in the package).
  • Add opentelemetry-distro to [tool.pyright] include.
  • Add {toxinidir}/opentelemetry-distro to the typecheck tox env so pyright can resolve the local package.

Why

pyright runs in strict mode but only covers a minority of packages; unlisted packages are effectively unchecked. This raises the typed floor by one more package while keeping CI green.

Verification

Ran the repo's pyright command (via the typecheck env dependency set) with the package added: 0 errors, 0 warnings, 0 informations.

Remaining work

Most packages still aren't type-checked and need more annotation work before they can be added cleanly (a few are close: resource-detector-containerid, resourcedetector-gcp at ~2 errors each; many others range from a couple dozen to a few hundred strict errors). Those are intentionally left for separate, focused PRs to keep this change small and reviewable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oss_31_expand_pyright_typing_scope

1 participant