We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6de5b3 commit 61ecd13Copy full SHA for 61ecd13
src/unstructured_client/_hooks/custom/clean_server_url_hook.py
@@ -10,11 +10,11 @@
10
class CleanServerUrlSDKInitHook(SDKInitHook):
11
"""Hook fixing common mistakes by users in defining `server_url` in the unstructured-client"""
12
13
- def clean_server_url(self, base_url) -> str:
+ def clean_server_url(self, base_url: str) -> str:
14
"""Fix url scheme and remove the '/general/v0/general' path."""
15
16
if not base_url:
17
- return None
+ return ""
18
# -- add a url scheme if not present (urllib.parse does not work reliably without it)
19
if "http" not in base_url:
20
base_url = "http://" + base_url
0 commit comments