Skip to content

[opentracing] Add missing stubs #14274

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

Open
wants to merge 1 commit 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
1 change: 1 addition & 0 deletions stubs/opentracing/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# They raise ModuleNotFoundError so they are not present at stubtest runtime:
opentracing.harness.api_check
opentracing.harness.scope_check
opentracing.scope_managers.gevent
Expand Down
4 changes: 0 additions & 4 deletions stubs/opentracing/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
version = "2.4.*"
upstream_repository = "https://github.com/opentracing/opentracing-python"
partial_stub = true

[tool.stubtest]
ignore_missing_stub = true
12 changes: 7 additions & 5 deletions stubs/opentracing/opentracing/logs.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ERROR_KIND: str
ERROR_OBJECT: str
EVENT: str
MESSAGE: str
STACK: str
from typing import Final

ERROR_KIND: Final = "error.kind"
ERROR_OBJECT: Final = "error.object"
EVENT: Final = "event"
MESSAGE: Final = "message"
STACK: Final = "stack"
8 changes: 5 additions & 3 deletions stubs/opentracing/opentracing/propagation.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from typing import Final

class UnsupportedFormatException(Exception): ...
class InvalidCarrierException(Exception): ...
class SpanContextCorruptedException(Exception): ...

class Format:
BINARY: str
TEXT_MAP: str
HTTP_HEADERS: str
BINARY: Final = "binary"
TEXT_MAP: Final = "text_map"
HTTP_HEADERS: Final = "http_headers"