mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
fix(otel): annotate SigNoz mutable collections for the type-discipline gate
The dict and list constructions and the header builder's return annotation each tripped LIT001/LIT002. Each is required by the surrounding contract, so they carry a `mutable-ok` reason rather than being restructured.
This commit is contained in:
parent
c3b80de7f8
commit
0e811770d6
1 changed files with 5 additions and 5 deletions
|
|
@ -33,8 +33,8 @@ def signoz_preset(
|
|||
base: Final = config_overrides or OpenTelemetryV2Config()
|
||||
key: Final = settings.ingestion_key
|
||||
return base.model_copy(
|
||||
update={
|
||||
"exporters": [
|
||||
update={ # mutable-ok: model_copy takes a dict of field updates
|
||||
"exporters": [ # mutable-ok: matches the config's exporters list
|
||||
*base.exporters,
|
||||
ExporterSpec(
|
||||
kind="otlp_http",
|
||||
|
|
@ -51,7 +51,7 @@ def signoz_preset(
|
|||
)
|
||||
|
||||
|
||||
def signoz_dynamic_headers(params: StandardCallbackDynamicParams) -> dict[str, str]:
|
||||
def signoz_dynamic_headers(params: StandardCallbackDynamicParams) -> dict[str, str]: # mutable-ok: registry type
|
||||
"""Per-request SigNoz OTLP headers from team/key dynamic params."""
|
||||
ingestion_key: Final = params.get("signoz_ingestion_key")
|
||||
return {header: value for header, value in (("signoz-ingestion-key", ingestion_key),) if value}
|
||||
key: Final = params.get("signoz_ingestion_key")
|
||||
return {header: value for header, value in (("signoz-ingestion-key", key),) if value} # mutable-ok: registry type
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue