Skip to content

Commit d712f06

Browse files
style: fix formatting in _semconv.py
1 parent c2114c5 commit d712f06

File tree

1 file changed

+9
-2
lines changed
  • opentelemetry-instrumentation/src/opentelemetry/instrumentation

1 file changed

+9
-2
lines changed

opentelemetry-instrumentation/src/opentelemetry/instrumentation/_semconv.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,11 +657,18 @@ def _set_status(
657657
StatusCode.OK: 1,
658658
StatusCode.ERROR: 2,
659659
}
660-
current_priority = _STATUS_PRIORITY.get(current_status.status_code, 0)
660+
current_priority = _STATUS_PRIORITY.get(
661+
current_status.status_code, 0
662+
)
661663
incoming_priority = _STATUS_PRIORITY.get(status, 0)
662664
if incoming_priority < current_priority:
663665
return
664-
description = current_status.description if current_status.description and status == current_status.status_code else None
666+
description = (
667+
current_status.description
668+
if current_status.description
669+
and status == current_status.status_code
670+
else None
671+
)
665672
span.set_status(Status(status, description))
666673
else:
667674
span.set_status(Status(status))

0 commit comments

Comments
 (0)