File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -166,13 +166,12 @@ def is_email(string: celtypes.Value) -> celpy.Result:
166166def is_uri (string : celtypes .Value ) -> celpy .Result :
167167 url = urlparse .urlparse (string )
168168 # urlparse correctly reads the scheme from URNs but parses everything
169- # after (except the query string) as the path.
169+ # after (except the query string) as the path.
170170 if url .scheme == "urn" :
171171 if not (url .path ):
172172 return celtypes .BoolType (False )
173- else :
174- if not all ([url .scheme , url .netloc , url .path ]):
175- return celtypes .BoolType (False )
173+ elif not all ([url .scheme , url .netloc , url .path ]):
174+ return celtypes .BoolType (False )
176175
177176 # If the query string contains percent-encoding, then try to decode it.
178177 # unquote will return the same string if it is improperly encoded.
You can’t perform that action at this time.
0 commit comments