Skip to content

Commit 7f8ea97

Browse files
committed
Add type annotation for parsed_iri
1 parent 6d9851d commit 7f8ea97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/pyld/iri_resolver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- The 'unresolve()' function is a move and rename of the 'remove_base()' function from 'jsonld.py'
44
"""
55

6-
from urllib.parse import urlparse, urlunparse
6+
from urllib.parse import ParseResult, urlparse, urlunparse
77

88

99
def is_character_allowed_after_relative_path_segment(ch: str) -> bool:
@@ -263,7 +263,7 @@ def unresolve(absolute_iri: str, base_iri: str = ""):
263263
# build relative IRI using urlunparse with empty scheme/netloc
264264
return urlunparse(('', '', rval, '', rel.query or '', rel.fragment or '')) or './'
265265

266-
def parse_authority(parsed_iri) -> str:
266+
def parse_authority(parsed_iri: ParseResult) -> str:
267267
"""
268268
Compute authority (netloc) and strip default ports
269269

0 commit comments

Comments
 (0)