diff options
author | Magnus Hagander | 2018-12-14 11:43:50 +0000 |
---|---|---|
committer | Magnus Hagander | 2018-12-14 11:43:50 +0000 |
commit | 5e8a4a7ab78a9939b21d11094234231bda59567a (patch) | |
tree | 9d32974ce783aeecbae020d6391baef4fa376a95 /postgresqleu/util/jsonutil.py | |
parent | 5e500d7d55ef048adc1dcf009db42d10c7ad53fc (diff) |
Replace tabs with spaces
In an effort to close up with PEP8, we should use spaces for indent
rather than tabs... Time to update your editor config!
Diffstat (limited to 'postgresqleu/util/jsonutil.py')
-rw-r--r-- | postgresqleu/util/jsonutil.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/postgresqleu/util/jsonutil.py b/postgresqleu/util/jsonutil.py index 774a9134..7783d364 100644 --- a/postgresqleu/util/jsonutil.py +++ b/postgresqleu/util/jsonutil.py @@ -2,9 +2,9 @@ from datetime import datetime, date import json class JsonSerializer(json.JSONEncoder): - def default(self, obj): - if isinstance(obj, datetime) or isinstance(obj, date): - return obj.isoformat() - if hasattr(obj, 'json_included_attributes'): - return dict([(k,getattr(obj, k)) for k in obj.json_included_attributes]) - return json.JSONEncoder.default(self, obj) + def default(self, obj): + if isinstance(obj, datetime) or isinstance(obj, date): + return obj.isoformat() + if hasattr(obj, 'json_included_attributes'): + return dict([(k,getattr(obj, k)) for k in obj.json_included_attributes]) + return json.JSONEncoder.default(self, obj) |