File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,7 @@ def get_href(self, transform_href: bool = True) -> str | None:
191191 owner_href = self .owner .get_self_href ()
192192 if owner_href is not None :
193193 href = make_relative_href (href , owner_href )
194+
194195 return href
195196
196197 @property
Original file line number Diff line number Diff line change @@ -71,12 +71,13 @@ def safe_urlparse(href: str) -> URLParseResult:
7171 query = parsed .query ,
7272 fragment = parsed .fragment ,
7373 )
74- if parsed .scheme == "file" :
75- # Windows drives sometimes get parsed as the netloc and sometimes
76- # as part of the parsed.path.
74+
75+ # Windows drives sometimes get parsed as the netloc and sometimes
76+ # as part of the parsed.path.
77+ if parsed .scheme == "file" and os .name == "nt" :
7778 if parsed .netloc :
7879 path = f"{ parsed .netloc } { parsed .path } "
79- elif parsed .path .startswith ("/" ) and os . name == "nt" :
80+ elif parsed .path .startswith ("/" ):
8081 path = parsed .path [1 :]
8182
8283 return URLParseResult (
You can’t perform that action at this time.
0 commit comments