Skip to content

Commit fd01518

Browse files
committed
please mypy
Signed-off-by: emdneto <[email protected]>
1 parent e839b4a commit fd01518

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

opentelemetry-api/src/opentelemetry/metrics/_internal/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def create_gauge( # type: ignore # pylint: disable=no-self-use
447447
name: str,
448448
unit: str = "",
449449
description: str = "",
450-
) -> Gauge: # type: ignore[reportReturnType]
450+
) -> Gauge: # pyright: ignore[reportReturnType]
451451
"""Creates a ``Gauge`` instrument
452452
453453
Args:

opentelemetry-api/src/opentelemetry/util/_decorator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ def __enter__(self) -> R:
6262
except StopIteration:
6363
raise RuntimeError("generator didn't yield") from None
6464

65-
def __call__(self, func: V) -> V: # type: ignore[reportIncompatibleMethodOverride]
65+
def __call__(self, func: V) -> V: # pyright: ignore [reportIncompatibleMethodOverride]
6666
if asyncio.iscoroutinefunction(func):
6767

6868
@functools.wraps(func) # type: ignore
69-
async def async_wrapper(*args: Pargs, **kwargs: Pkwargs) -> R: # type: ignore[reportInvalidTypeVarUse]
69+
async def async_wrapper(*args: Pargs, **kwargs: Pkwargs) -> R: # pyright: ignore [reportInvalidTypeVarUse]
7070
with self._recreate_cm(): # type: ignore
7171
return await func(*args, **kwargs) # type: ignore
7272

@@ -78,8 +78,8 @@ def _agnosticcontextmanager(
7878
func: "Callable[P, Iterator[R]]",
7979
) -> "Callable[P, _AgnosticContextManager[R]]":
8080
@functools.wraps(func)
81-
def helper(*args: Pargs, **kwargs: Pkwargs) -> _AgnosticContextManager[R]: # type: ignore[reportInvalidTypeVarUse]
82-
return _AgnosticContextManager(func, args, kwargs) # type: ignore[reportArgumentType]
81+
def helper(*args: Pargs, **kwargs: Pkwargs) -> _AgnosticContextManager[R]: # pyright: ignore [reportInvalidTypeVarUse]
82+
return _AgnosticContextManager(func, args, kwargs) # pyright: ignore [reportArgumentType]
8383

8484
# Ignoring the type to keep the original signature of the function
8585
return helper # type: ignore[return-value]

0 commit comments

Comments
 (0)