Skip to content

Commit

Permalink
opentelemetry-processor-baggage: silence ruff warning
Browse files Browse the repository at this point in the history
Ruff warns about the following which given the implementation seems safe
to ignore:

E731 Do not assign a `lambda` expression, use a `def`
   |
25 | # A BaggageKeyPredicate that always returns True, allowing all baggage keys to be added to spans
26 | ALLOW_ALL_BAGGAGE_KEYS: BaggageKeyPredicateT = lambda _: True
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E731
   |
   = help: Rewrite `ALLOW_ALL_BAGGAGE_KEYS` as a `def`
  • Loading branch information
xrmx committed Jul 2, 2024
1 parent 529178d commit 18b0915
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
BaggageKeyPredicateT = Callable[[str], bool]

# A BaggageKeyPredicate that always returns True, allowing all baggage keys to be added to spans
ALLOW_ALL_BAGGAGE_KEYS: BaggageKeyPredicateT = lambda _: True
ALLOW_ALL_BAGGAGE_KEYS: BaggageKeyPredicateT = lambda _: True # noqa: E731


class BaggageSpanProcessor(SpanProcessor):
Expand Down

0 comments on commit 18b0915

Please sign in to comment.