Skip to content

Commit 30c3c4a

Browse files
author
Eric Honkanen
committed
Fix syntax
1 parent d5381ff commit 30c3c4a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

rest_framework_ember/utils.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@ def format_keys(obj, format_type=None):
4242
4343
:format_type: Either 'camelize' or 'underscore'
4444
"""
45-
if (getattr(settings, 'REST_EMBER_FORMAT_KEYS', False)
46-
and format_type in ('camelize', 'underscore')):
45+
if getattr(settings, 'REST_EMBER_FORMAT_KEYS', False)\
46+
and format_type in ('camelize', 'underscore'):
4747

4848
if isinstance(obj, dict):
4949
formatted = {}
5050
for key, value in obj.items():
5151
if format_type == 'camelize':
52-
(formatted[inflection.camelize(key, False)]
53-
= format_keys(value, format_type))
52+
formatted[inflection.camelize(key, False)]\
53+
= format_keys(value, format_type)
5454
elif format_type == 'underscore':
55-
(formatted[inflection.underscore(key)]
56-
= format_keys(value, format_type))
55+
formatted[inflection.underscore(key)]\
56+
= format_keys(value, format_type)
5757
return formatted
5858
if isinstance(obj, list):
5959
return [format_keys(item, format_type) for item in obj]
@@ -69,7 +69,7 @@ def format_resource_name(obj, name):
6969
"""
7070
if (getattr(settings, 'REST_EMBER_PLURALIZE_KEYS', False)
7171
and isinstance(obj, list)):
72-
72+
7373
return inflection.pluralize(name) if len(obj) > 1 else name
7474
else:
7575
return name

0 commit comments

Comments
 (0)