Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 663e570

Browse files
committed
Correct typing
1 parent 2414f82 commit 663e570

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

opentelemetry-api/src/opentelemetry/baggage/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def get_baggage(
7070

7171
def set_baggage(
7272
name: str, value: object, context: Optional[Context] = None
73-
) -> Optional[Context]:
73+
) -> Context:
7474
"""Sets a value in the Baggage
7575
7676
Args:
@@ -83,7 +83,9 @@ def set_baggage(
8383
"""
8484
baggage = dict(get_all(context=context))
8585
if not _is_valid_key(name):
86-
_logger.warning("Baggage key `%s` does not match format, ignoring", name)
86+
_logger.warning(
87+
"Baggage key `%s` does not match format, ignoring", name
88+
)
8789
elif not _is_valid_value(str(value)):
8890
_logger.warning(
8991
"Baggage value `%s` does not match format, ignorig", value
@@ -93,9 +95,7 @@ def set_baggage(
9395
return set_value(_BAGGAGE_KEY, baggage, context=context)
9496

9597

96-
def remove_baggage(
97-
name: str, context: Optional[Context] = None
98-
) -> Optional[Context]:
98+
def remove_baggage(name: str, context: Optional[Context] = None) -> Context:
9999
"""Removes a value from the Baggage
100100
101101
Args:

0 commit comments

Comments
 (0)