feat: Fixed Arize & Phoenix Python / Super Linter Issues

pull/19840/head
Ali Saleh 1 year ago committed by crazywoola
parent 000eb690b9
commit 5d60281230

@ -45,6 +45,9 @@ class ArizeConfig(BaseTracingConfig):
v = "https://otlp.arize.com" v = "https://otlp.arize.com"
if not v.startswith(("https://", "http://")): if not v.startswith(("https://", "http://")):
raise ValueError("endpoint must start with https:// or http://") raise ValueError("endpoint must start with https:// or http://")
if "/" in v[8:]:
parts = v.split("/")
v = parts[0] + "//" + parts[2]
return v return v
@ -73,6 +76,9 @@ class PhoenixConfig(BaseTracingConfig):
v = "https://app.phoenix.arize.com" v = "https://app.phoenix.arize.com"
if not v.startswith(("https://", "http://")): if not v.startswith(("https://", "http://")):
raise ValueError("endpoint must start with https:// or http://") raise ValueError("endpoint must start with https:// or http://")
if "/" in v[8:]:
parts = v.split("/")
v = parts[0] + "//" + parts[2]
return v return v

@ -119,4 +119,4 @@
] ]
}, },
"name": "ArizeIcon" "name": "ArizeIcon"
} }

@ -119,4 +119,4 @@
] ]
}, },
"name": "ArizeIconBig" "name": "ArizeIconBig"
} }

@ -850,4 +850,4 @@
] ]
}, },
"name": "PhoenixIcon" "name": "PhoenixIcon"
} }

@ -850,4 +850,4 @@
] ]
}, },
"name": "PhoenixIconBig" "name": "PhoenixIconBig"
} }

Loading…
Cancel
Save