diff --git a/opentelemetry-api/src/opentelemetry/util/_decorator.py b/opentelemetry-api/src/opentelemetry/util/_decorator.py index f585078bba..5bf88552b8 100644 --- a/opentelemetry-api/src/opentelemetry/util/_decorator.py +++ b/opentelemetry-api/src/opentelemetry/util/_decorator.py @@ -30,8 +30,8 @@ class _AgnosticContextManager( - contextlib._GeneratorContextManager, - Generic[R], # type: ignore # FIXME use contextlib._GeneratorContextManager[R] when we drop the python 3.8 support + contextlib._GeneratorContextManager, # type: ignore # FIXME use contextlib._GeneratorContextManager[R] when we drop the python 3.8 support + Generic[R], ): # pylint: disable=protected-access """Context manager that can decorate both async and sync functions. diff --git a/opentelemetry-api/tests/trace/test_status.py b/opentelemetry-api/tests/trace/test_status.py index f670bdb44b..d7ea944e64 100644 --- a/opentelemetry-api/tests/trace/test_status.py +++ b/opentelemetry-api/tests/trace/test_status.py @@ -31,8 +31,9 @@ def test_constructor(self): def test_invalid_description(self): with self.assertLogs(level=WARNING) as warning: status = Status( - status_code=StatusCode.ERROR, description={"test": "val"} - ) # type: ignore + status_code=StatusCode.ERROR, + description={"test": "val"}, # type: ignore + ) self.assertIs(status.status_code, StatusCode.ERROR) self.assertEqual(status.description, None) self.assertIn(