Skip to content

Commit 582fd85

Browse files
committed
Use .strip() instead
1 parent 9fd9701 commit 582fd85

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

weaviate/collections/classes/generative.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@
3737
def _parse_anyhttpurl(url: Optional[AnyHttpUrl]) -> Optional[str]:
3838
if url is None:
3939
return None
40-
str_ = str(url)
41-
if str_[-1] == "/":
42-
str_ = str_[:-1]
43-
return str_
40+
return str(url).strip("/")
4441

4542

4643
def _to_text_array(values: Optional[Iterable[str]]) -> Optional[TextArray]:

0 commit comments

Comments
 (0)