diff options
author | Vlastimil Zíma <vlastimil.zima@nic.cz> | 2017-11-22 13:24:46 +0100 |
---|---|---|
committer | Vlastimil Zíma <vlastimil.zima@nic.cz> | 2017-11-22 13:46:40 +0100 |
commit | fe13eb842bb3958c55f29c1cd0e244af3c4d2c3c (patch) | |
tree | aa8113e80d83995b602b50a9172a8bdfe5909ea9 /openid/yadis | |
parent | 189a2092b20c7e6f61c0b35c73626b7513e3100b (diff) | |
download | openid-fe13eb842bb3958c55f29c1cd0e244af3c4d2c3c.tar.gz |
Clean imports by isort
Diffstat (limited to 'openid/yadis')
-rw-r--r-- | openid/yadis/discover.py | 6 | ||||
-rw-r--r-- | openid/yadis/etxrd.py | 6 | ||||
-rw-r--r-- | openid/yadis/filters.py | 1 | ||||
-rw-r--r-- | openid/yadis/parsehtml.py | 2 | ||||
-rw-r--r-- | openid/yadis/services.py | 5 | ||||
-rw-r--r-- | openid/yadis/xrires.py | 3 |
6 files changed, 12 insertions, 11 deletions
diff --git a/openid/yadis/discover.py b/openid/yadis/discover.py index 1412d74..27fcd01 100644 --- a/openid/yadis/discover.py +++ b/openid/yadis/discover.py @@ -4,11 +4,10 @@ __all__ = ['discover', 'DiscoveryResult', 'DiscoveryFailure'] from StringIO import StringIO from openid import fetchers - -from openid.yadis.constants import \ - YADIS_HEADER_NAME, YADIS_CONTENT_TYPE, YADIS_ACCEPT_HEADER +from openid.yadis.constants import YADIS_ACCEPT_HEADER, YADIS_CONTENT_TYPE, YADIS_HEADER_NAME from openid.yadis.parsehtml import MetaNotFound, findHTMLMeta + class DiscoveryFailure(Exception): """Raised when a YADIS protocol error occurs in the discovery process""" identity_url = None @@ -152,4 +151,3 @@ def whereIsYadis(resp): pass return yadis_loc - diff --git a/openid/yadis/etxrd.py b/openid/yadis/etxrd.py index ef5cadf..52a8ab3 100644 --- a/openid/yadis/etxrd.py +++ b/openid/yadis/etxrd.py @@ -18,13 +18,14 @@ __all__ = [ 'expandServices', ] -import sys import random - +import sys from datetime import datetime from time import strptime from openid.oidutil import importElementTree +from openid.yadis import xri + ElementTree = importElementTree() # the different elementtree modules don't have a common exception @@ -40,7 +41,6 @@ except (SystemExit, MemoryError, AssertionError, ImportError): except: XMLError = sys.exc_info()[0] -from openid.yadis import xri class XRDSError(Exception): """An error with the XRDS document.""" diff --git a/openid/yadis/filters.py b/openid/yadis/filters.py index d01c221..43e4f3f 100644 --- a/openid/yadis/filters.py +++ b/openid/yadis/filters.py @@ -13,6 +13,7 @@ __all__ = [ from openid.yadis.etxrd import expandService + class BasicServiceEndpoint(object): """Generic endpoint object that contains parsed service information, as well as a reference to the service element from diff --git a/openid/yadis/parsehtml.py b/openid/yadis/parsehtml.py index 875a089..c2f8029 100644 --- a/openid/yadis/parsehtml.py +++ b/openid/yadis/parsehtml.py @@ -1,8 +1,8 @@ __all__ = ['findHTMLMeta', 'MetaNotFound'] -from HTMLParser import HTMLParser, HTMLParseError import htmlentitydefs import re +from HTMLParser import HTMLParseError, HTMLParser from openid.yadis.constants import YADIS_HEADER_NAME diff --git a/openid/yadis/services.py b/openid/yadis/services.py index 4753c19..65d8834 100644 --- a/openid/yadis/services.py +++ b/openid/yadis/services.py @@ -1,8 +1,9 @@ # -*- test-case-name: openid.test.test_services -*- +from openid.yadis.discover import DiscoveryFailure, discover +from openid.yadis.etxrd import XRDSError, iterServices, parseXRDS from openid.yadis.filters import mkFilter -from openid.yadis.discover import discover, DiscoveryFailure -from openid.yadis.etxrd import parseXRDS, iterServices, XRDSError + def getServiceEndpoints(input_url, flt=None): """Perform the Yadis protocol on the input URL and return an diff --git a/openid/yadis/xrires.py b/openid/yadis/xrires.py index be663c6..e8fd7e4 100644 --- a/openid/yadis/xrires.py +++ b/openid/yadis/xrires.py @@ -3,10 +3,11 @@ """ from urllib import urlencode + from openid import fetchers from openid.yadis import etxrd -from openid.yadis.xri import toURINormal from openid.yadis.services import iterServices +from openid.yadis.xri import toURINormal DEFAULT_PROXY = 'http://proxy.xri.net/' |