Skip to content

Commit 74330f3

Browse files
committed
Remove scheme and any trailing slashes from meta schema key
1 parent 61382d7 commit 74330f3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: jsonschema/_utils.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ class URIDict(MutableMapping):
1212
"""
1313

1414
def normalize(self, uri):
15-
return urlsplit(uri).geturl()
15+
components = urlsplit(uri)
16+
netloc = components.netloc
17+
path = re.sub(r"[/]+$", "", components.path)
18+
return netloc + path
1619

1720
def __init__(self, *args, **kwargs):
1821
self.store = dict()

0 commit comments

Comments
 (0)