Skip to content

Commit 9764a26

Browse files
committed
feat: reimplement dandi.utils.is_url
So that it can determine whether a given string is a standard HTTP, HTTPS, FTP URL, or DANDI URL.
1 parent 407e551 commit 9764a26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dandi/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ def _get_instance(
650650

651651
# This is defined in module level because repeated invocations of
652652
# TypeAdapter creation is expensive
653-
_url_adapter = TypeAdapter(AnyHttpUrl | FtpUrl)
653+
_url_adapter: TypeAdapter = TypeAdapter(AnyHttpUrl | FtpUrl)
654654

655655

656656
def is_url(s: str) -> bool:

0 commit comments

Comments
 (0)