Skip to content

Commit

Permalink
[#1078] pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Sep 4, 2013
1 parent ce5d7e8 commit 9330b47
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ckan/lib/lazyjson.py
@@ -1,5 +1,6 @@
import json


class LazyJSONObject(object):
'''An object that behaves like a dict returned from json.loads'''
def __init__(self, json_string):
Expand Down Expand Up @@ -27,10 +28,10 @@ def method(self, *args, **kwargs):
return method

for fn in ['__cmp__', '__contains__', '__delitem__', '__eq__', '__ge__',
'__getitem__', '__gt__', '__iter__', '__le__', '__len__', '__lt__',
'__ne__', '__setitem__', 'clear', 'copy', 'fromkeys', 'get', 'has_key',
'items', 'iteritems', 'iterkeys', 'itervalues', 'keys', 'pop',
'popitem', 'setdefault', 'update', 'values']:
'__getitem__', '__gt__', '__iter__', '__le__', '__len__', '__lt__',
'__ne__', '__setitem__', 'clear', 'copy', 'fromkeys', 'get',
'has_key', 'items', 'iteritems', 'iterkeys', 'itervalues', 'keys',
'pop', 'popitem', 'setdefault', 'update', 'values']:
setattr(LazyJSONObject, fn, _loads_method(fn))


Expand Down

0 comments on commit 9330b47

Please sign in to comment.