@@ -100,8 +100,8 @@ def requires_auth(f):
100100 :param func f: Function to wrap
101101 :raises AuthError: If function called without an authenticated session
102102 """
103- # When Python 2.4 support is dropped move straight to functools.wraps, don't
104- # pass go and don't collect $200.
103+ # When Python 2.4 support is dropped move straight to functools.wraps,
104+ # don't pass go and don't collect $200.
105105 def wrapper (self , * args , ** kwargs ):
106106 if not self .request .access_token and not self .request .api_token :
107107 raise AuthError ("%r requires an authenticated session"
@@ -161,7 +161,8 @@ def get_value(self, *args, **kwargs):
161161 # unicode keys are not accepted as kwargs by python, see:
162162 #http://mail-archives.apache.org/mod_mbox/qpid-dev/200609.mbox/%[email protected] %3E 163163 # So we make a local dict with the same keys but as strings:
164- return datatype (** dict ((str (k ), v ) for (k , v ) in value .iteritems ()))
164+ return datatype (** dict ((str (k ), v )
165+ for (k , v ) in value .iteritems ()))
165166 return value
166167
167168 def get_values (self , * args , ** kwargs ):
@@ -170,7 +171,8 @@ def get_values(self, *args, **kwargs):
170171 if datatype :
171172 # Same as above, unicode keys will blow up in **args, so we need to
172173 # create a new 'values' dict with string keys
173- return [datatype (** dict ((str (k ), v ) for (k , v ) in value .iteritems ()))
174+ return [datatype (** dict ((str (k ), v )
175+ for (k , v ) in value .iteritems ()))
174176 for value in values ]
175177 else :
176178 return values
@@ -273,7 +275,7 @@ def __getitem__(self, key):
273275 responses to ``BaseData`` derived objects.
274276 """
275277 warn ("Subscript access on %r is deprecated, use object attributes"
276- % self .__class__ .__name__ , DeprecationWarning )
278+ % self .__class__ .__name__ , DeprecationWarning )
277279 if not key in self ._meta .keys ():
278280 raise KeyError (key )
279281 return getattr (self , key )
@@ -284,7 +286,7 @@ def __setitem__(self, key, value):
284286 :see: ``BaseData.__getitem__``
285287 """
286288 warn ("Subscript access on %r is deprecated, use object attributes"
287- % self .__class__ .__name__ , DeprecationWarning )
289+ % self .__class__ .__name__ , DeprecationWarning )
288290 if not key in self ._meta .keys ():
289291 raise KeyError (key )
290292 setattr (self , key , value )
0 commit comments