aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/utils/encoders.py
diff options
context:
space:
mode:
authorTom Christie2014-08-19 13:28:07 +0100
committerTom Christie2014-08-19 13:28:07 +0100
commitbf09c32de8f9d528f83e9cb7a2773d1f4c9ab563 (patch)
tree334c85c136fe1dc010f8d7860b9431b3a9d87e56 /rest_framework/utils/encoders.py
parente385a7b8eb6e538698f28128e43fe8bfaefd4e97 (diff)
downloaddjango-rest-framework-bf09c32de8f9d528f83e9cb7a2773d1f4c9ab563.tar.bz2
Code linting and added runtests.py
Diffstat (limited to 'rest_framework/utils/encoders.py')
-rw-r--r--rest_framework/utils/encoders.py31
1 files changed, 20 insertions, 11 deletions
diff --git a/rest_framework/utils/encoders.py b/rest_framework/utils/encoders.py
index c125ac8a..00ffdfba 100644
--- a/rest_framework/utils/encoders.py
+++ b/rest_framework/utils/encoders.py
@@ -98,14 +98,23 @@ else:
node.flow_style = best_style
return node
- SafeDumper.add_representer(decimal.Decimal,
- SafeDumper.represent_decimal)
-
- SafeDumper.add_representer(SortedDict,
- yaml.representer.SafeRepresenter.represent_dict)
- SafeDumper.add_representer(DictWithMetadata,
- yaml.representer.SafeRepresenter.represent_dict)
- SafeDumper.add_representer(SortedDictWithMetadata,
- yaml.representer.SafeRepresenter.represent_dict)
- SafeDumper.add_representer(types.GeneratorType,
- yaml.representer.SafeRepresenter.represent_list)
+ SafeDumper.add_representer(
+ decimal.Decimal,
+ SafeDumper.represent_decimal
+ )
+ SafeDumper.add_representer(
+ SortedDict,
+ yaml.representer.SafeRepresenter.represent_dict
+ )
+ SafeDumper.add_representer(
+ DictWithMetadata,
+ yaml.representer.SafeRepresenter.represent_dict
+ )
+ SafeDumper.add_representer(
+ SortedDictWithMetadata,
+ yaml.representer.SafeRepresenter.represent_dict
+ )
+ SafeDumper.add_representer(
+ types.GeneratorType,
+ yaml.representer.SafeRepresenter.represent_list
+ )