Skip to content

Commit

Permalink
fix for mypy
Browse files Browse the repository at this point in the history
Signed-off-by: emdneto <[email protected]>
  • Loading branch information
emdneto committed Oct 13, 2024
1 parent 7e35498 commit 2799814
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions opentelemetry-api/src/opentelemetry/util/_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 3 additions & 2 deletions opentelemetry-api/tests/trace/test_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 2799814

Please sign in to comment.