File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
opentelemetry-api/src/opentelemetry/context Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 2525logger = logging .getLogger (__name__ )
2626
2727
28- def _load_runtime_context () -> typing . Optional [ _RuntimeContext ] :
28+ def _load_runtime_context () -> _RuntimeContext :
2929 """Initialize the RuntimeContext
3030
3131 Returns:
@@ -127,7 +127,7 @@ def get_current() -> Context:
127127 Returns:
128128 The current `Context` object.
129129 """
130- return _RUNTIME_CONTEXT .get_current () # type:ignore
130+ return _RUNTIME_CONTEXT .get_current ()
131131
132132
133133def attach (context : Context ) -> object :
@@ -140,7 +140,7 @@ def attach(context: Context) -> object:
140140 Returns:
141141 A token that can be used with `detach` to reset the context.
142142 """
143- return _RUNTIME_CONTEXT .attach (context ) # type:ignore
143+ return _RUNTIME_CONTEXT .attach (context )
144144
145145
146146def detach (token : object ) -> None :
@@ -151,7 +151,7 @@ def detach(token: object) -> None:
151151 token: The Token that was returned by a previous call to attach a Context.
152152 """
153153 try :
154- _RUNTIME_CONTEXT .detach (token ) # type: ignore
154+ _RUNTIME_CONTEXT .detach (token )
155155 except Exception : # pylint: disable=broad-except
156156 logger .exception ("Failed to detach context" )
157157
You can’t perform that action at this time.
0 commit comments