Add pydocstyle to the ruff rules (#52136)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Harry Mellor <hej.mellor@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
804e5377aa
commit
8c1557a79c
@@ -94,9 +94,7 @@ def instrument(
|
||||
attributes: dict[str, str] | None = None,
|
||||
record_exception: bool = True,
|
||||
):
|
||||
"""
|
||||
Generic decorator to instrument functions.
|
||||
"""
|
||||
"""Generic decorator to instrument functions."""
|
||||
if obj is None:
|
||||
return functools.partial(
|
||||
instrument,
|
||||
@@ -135,6 +133,7 @@ def instrument_manual(
|
||||
attributes: Optional dict of span attributes.
|
||||
context: Optional trace context (e.g., from extract_trace_context).
|
||||
kind: Optional SpanKind (e.g., SpanKind.SERVER).
|
||||
|
||||
"""
|
||||
is_available, _, _, _, manual_instrument_fn = _REGISTERED_TRACING_BACKENDS["otel"]
|
||||
if is_available():
|
||||
@@ -146,8 +145,7 @@ def instrument_manual(
|
||||
|
||||
|
||||
def is_tracing_available() -> bool:
|
||||
"""
|
||||
Returns True if any tracing backend (OTel, Profiler, etc.) is available.
|
||||
"""Returns True if any tracing backend (OTel, Profiler, etc.) is available.
|
||||
Use this to guard expensive tracing logic in the main code.
|
||||
"""
|
||||
check_available = [
|
||||
|
||||
Reference in New Issue
Block a user