Skip to content

Commit 83a6844

Browse files
authored
[opentracing] Add missing stubs (#14274)
1 parent 0f89c82 commit 83a6844

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

stubs/opentracing/@tests/stubtest_allowlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# They raise ModuleNotFoundError so they are not present at stubtest runtime:
12
opentracing.harness.api_check
23
opentracing.harness.scope_check
34
opentracing.scope_managers.gevent

stubs/opentracing/METADATA.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
version = "2.4.*"
22
upstream_repository = "https://github.com/opentracing/opentracing-python"
3-
partial_stub = true
4-
5-
[tool.stubtest]
6-
ignore_missing_stub = true
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
ERROR_KIND: str
2-
ERROR_OBJECT: str
3-
EVENT: str
4-
MESSAGE: str
5-
STACK: str
1+
from typing import Final
2+
3+
ERROR_KIND: Final = "error.kind"
4+
ERROR_OBJECT: Final = "error.object"
5+
EVENT: Final = "event"
6+
MESSAGE: Final = "message"
7+
STACK: Final = "stack"
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
from typing import Final
2+
13
class UnsupportedFormatException(Exception): ...
24
class InvalidCarrierException(Exception): ...
35
class SpanContextCorruptedException(Exception): ...
46

57
class Format:
6-
BINARY: str
7-
TEXT_MAP: str
8-
HTTP_HEADERS: str
8+
BINARY: Final = "binary"
9+
TEXT_MAP: Final = "text_map"
10+
HTTP_HEADERS: Final = "http_headers"

0 commit comments

Comments
 (0)