MCPcopy
hub / github.com/pydantic/pydantic / remove_trailing_slash

Function remove_trailing_slash

tests/test_networks.py:1119–1121  ·  view source on GitHub ↗

Custom url -> str transformer that removes trailing slash.

(url: AnyUrl)

Source from the content-addressed store, hash-verified

1117
1118def test_after_validator() -> None:
1119 def remove_trailing_slash(url: AnyUrl) -> str:
1120 """Custom url -> str transformer that removes trailing slash."""
1121 return str(url._url).rstrip('/')
1122
1123 HttpUrl = Annotated[
1124 AnyUrl,

Callers 1

test_after_validatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected