Skip to content

Commit

Permalink
fix type anno for pydantic 2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnBe committed Dec 3, 2024
1 parent dcf8783 commit afd85ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bioimageio/spec/_internal/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ def _validate_url_impl(
elif response.status_code != 200:
raise ValueError(f"{response.status_code}: {response.reason} {url}")

return pydantic.HttpUrl(url)
# in pydantic < 2.10 `HttpURL = Annotated[AnyUrl, ...]`...
return pydantic.HttpUrl( # pyright: ignore[reportCallIssue]
url
) # pyright: ignore[reportUnknownVariableType]


class HttpUrl(RootHttpUrl):
Expand Down

0 comments on commit afd85ae

Please sign in to comment.