Skip to content

Commit f94881c

Browse files
Apply ruff formatting to decorator auto-initialization logic
- Fix line length and spacing issues identified by pre-commit checks - Maintain functionality while conforming to code style requirements Co-Authored-By: Alex <[email protected]>
1 parent e942f6e commit f94881c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

agentops/sdk/decorators/factory.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,20 @@ def wrapper(
8282
wrapped_func: Callable[..., Any], instance: Optional[Any], args: tuple, kwargs: Dict[str, Any]
8383
) -> Any:
8484
if not tracer.initialized:
85-
logger.warning("AgentOps SDK not initialized. Attempting to initialize with defaults before applying decorator.")
85+
logger.warning(
86+
"AgentOps SDK not initialized. Attempting to initialize with defaults before applying decorator."
87+
)
8688
try:
8789
from agentops import init
90+
8891
init()
8992
if not tracer.initialized:
9093
logger.error("SDK initialization failed. Decorator will not instrument function.")
9194
return wrapped_func(*args, **kwargs)
9295
except Exception as e:
93-
logger.error(f"SDK auto-initialization failed during decorator application: {e}. Decorator will not instrument function.")
96+
logger.error(
97+
f"SDK auto-initialization failed during decorator application: {e}. Decorator will not instrument function."
98+
)
9499
return wrapped_func(*args, **kwargs)
95100

96101
operation_name = name or wrapped_func.__name__

0 commit comments

Comments
 (0)