File tree 1 file changed +4
-4
lines changed
opentelemetry-api/src/opentelemetry/context
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 25
25
logger = logging .getLogger (__name__ )
26
26
27
27
28
- def _load_runtime_context () -> typing . Optional [ _RuntimeContext ] :
28
+ def _load_runtime_context () -> _RuntimeContext :
29
29
"""Initialize the RuntimeContext
30
30
31
31
Returns:
@@ -127,7 +127,7 @@ def get_current() -> Context:
127
127
Returns:
128
128
The current `Context` object.
129
129
"""
130
- return _RUNTIME_CONTEXT .get_current () # type:ignore
130
+ return _RUNTIME_CONTEXT .get_current ()
131
131
132
132
133
133
def attach (context : Context ) -> object :
@@ -140,7 +140,7 @@ def attach(context: Context) -> object:
140
140
Returns:
141
141
A token that can be used with `detach` to reset the context.
142
142
"""
143
- return _RUNTIME_CONTEXT .attach (context ) # type:ignore
143
+ return _RUNTIME_CONTEXT .attach (context )
144
144
145
145
146
146
def detach (token : object ) -> None :
@@ -151,7 +151,7 @@ def detach(token: object) -> None:
151
151
token: The Token that was returned by a previous call to attach a Context.
152
152
"""
153
153
try :
154
- _RUNTIME_CONTEXT .detach (token ) # type: ignore
154
+ _RUNTIME_CONTEXT .detach (token )
155
155
except Exception : # pylint: disable=broad-except
156
156
logger .exception ("Failed to detach context" )
157
157
You can’t perform that action at this time.
0 commit comments