Python3 Migrate
This commit is contained in:
33
venv/lib/python3.7/site-packages/uritools/classify.py
Normal file
33
venv/lib/python3.7/site-packages/uritools/classify.py
Normal file
@@ -0,0 +1,33 @@
|
||||
from .split import urisplit
|
||||
|
||||
# TODO: use specialized checks/regexes for performance
|
||||
|
||||
|
||||
def isuri(uristring):
|
||||
"""Return :const:`True` if `uristring` is a URI."""
|
||||
return urisplit(uristring).isuri()
|
||||
|
||||
|
||||
def isabsuri(uristring):
|
||||
"""Return :const:`True` if `uristring` is an absolute URI."""
|
||||
return urisplit(uristring).isabsuri()
|
||||
|
||||
|
||||
def isnetpath(uristring):
|
||||
"""Return :const:`True` if `uristring` is a network-path reference."""
|
||||
return urisplit(uristring).isnetpath()
|
||||
|
||||
|
||||
def isabspath(uristring):
|
||||
"""Return :const:`True` if `uristring` is an absolute-path reference."""
|
||||
return urisplit(uristring).isabspath()
|
||||
|
||||
|
||||
def isrelpath(uristring):
|
||||
"""Return :const:`True` if `uristring` is a relative-path reference."""
|
||||
return urisplit(uristring).isrelpath()
|
||||
|
||||
|
||||
def issamedoc(uristring):
|
||||
"""Return :const:`True` if `uristring` is a same-document reference."""
|
||||
return urisplit(uristring).issamedoc()
|
||||
Reference in New Issue
Block a user