@@ -53,7 +53,8 @@ def get_services(self):
5353 the list of supported providers and their regexes
5454 """
5555
56- if self .services : return self .services
56+ if self .services :
57+ return self .services
5758
5859 url = 'http://api.embed.ly/1/services/python'
5960
@@ -66,10 +67,10 @@ def get_services(self):
6667 resp_data = json .loads (content )
6768 self .services = resp_data
6869
69- #build the regex that we can use later.
70+ # build the regex that we can use later
7071 _regex = []
7172 for each in self .get_services ():
72- _regex .append ('|' .join (each .get ('regex' ,[])))
73+ _regex .append ('|' .join (each .get ('regex' , [])))
7374
7475 self ._regex = re .compile ('|' .join (_regex ))
7576
@@ -100,10 +101,10 @@ def _get(self, version, method, url_or_urls, **kwargs):
100101 raise ValueError ('%s requires a url or a list of urls given: %s' %
101102 (method .title (), url_or_urls ))
102103
103- #A flag we can use instead of calling isinstance all the time.
104+ # a flag we can use instead of calling isinstance() all the time
104105 multi = isinstance (url_or_urls , list )
105106
106- # Throw an error early for too many URLs
107+ # throw an error early for too many URLs
107108 if multi and len (url_or_urls ) > 20 :
108109 raise ValueError ('Embedly accepts only 20 urls at a time. Url '
109110 'Count:%s' % len (url_or_urls ))
@@ -112,7 +113,7 @@ def _get(self, version, method, url_or_urls, **kwargs):
112113
113114 key = kwargs .get ('key' , self .key )
114115
115- #make sure that a key was set on the client or passed in.
116+ # make sure that a key was set on the client or passed in
116117 if not key :
117118 raise ValueError ('Requires a key. None given: %s' % key )
118119
0 commit comments