Skip to content

Commit

Permalink
try to get CI passing
Browse files Browse the repository at this point in the history
  • Loading branch information
aabmass committed Dec 6, 2024
1 parent 858c23a commit 6a8878d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@

import logging
import traceback
from typing import Callable, Optional, ParamSpec, TypeVar
from typing import Any, Callable, Optional, TypeVar

P = ParamSpec("P")
R = TypeVar("R")


def dont_throw(func: Callable[P, R]) -> Callable[P, Optional[R]]:
def dont_throw(func: Callable[..., R]) -> Callable[..., Optional[R]]:
"""
A decorator that wraps the passed in function and logs exceptions instead of throwing them.
Expand All @@ -30,7 +29,7 @@ def dont_throw(func: Callable[P, R]) -> Callable[P, Optional[R]]:
# Obtain a logger specific to the function's module
logger = logging.getLogger(func.__module__)

def wrapper(*args: P.args, **kwargs: P.kwargs) -> Optional[R]:
def wrapper(*args: Any, **kwargs: Any) -> Optional[R]:
try:
return func(*args, **kwargs)
except Exception: # pylint: disable=broad-except
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ idna==3.10
importlib-metadata==6.11.0
iniconfig==2.0.0
multidict==6.1.0
numpy==1.24.4
packaging==24.0
pluggy==1.5.0
propcache==0.2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ idna==3.10
importlib_metadata==8.5.0
iniconfig==2.0.0
multidict==6.1.0
numpy==1.24.4
packaging==24.2
pluggy==1.5.0
propcache==0.2.0
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ commands =
test-instrumentation-openai-v2: pytest {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests {posargs}
lint-instrumentation-openai-v2: sh -c "cd instrumentation-genai && pylint --rcfile ../.pylintrc opentelemetry-instrumentation-openai-v2"

test-instrumentation-vertexai-v2: pytest {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-vertexai-v2/tests {posargs:--vcr-record=none}
test-instrumentation-vertexai-v2: pytest {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-vertexai-v2/tests --vcr-record=none {posargs}
lint-instrumentation-vertexai-v2: sh -c "cd instrumentation-genai && pylint --rcfile ../.pylintrc opentelemetry-instrumentation-vertexai-v2"

test-instrumentation-sio-pika: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-pika/tests {posargs}
Expand Down

0 comments on commit 6a8878d

Please sign in to comment.