From 27998141cf36054c36d9865607dde1a9937501c9 Mon Sep 17 00:00:00 2001 From: emdneto <9735060+emdneto@users.noreply.github.com> Date: Sun, 13 Oct 2024 17:44:34 -0300 Subject: [PATCH] fix for mypy Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> --- opentelemetry-api/src/opentelemetry/util/_decorator.py | 4 ++-- opentelemetry-api/tests/trace/test_status.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/opentelemetry-api/src/opentelemetry/util/_decorator.py b/opentelemetry-api/src/opentelemetry/util/_decorator.py index f585078bba6..5bf88552b85 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 f670bdb44b7..d7ea944e646 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(