From ca40b03b936867e5924f29aa399acb130b9bf930 Mon Sep 17 00:00:00 2001 From: Kirk Strauser Date: Wed, 3 Jul 2013 09:57:28 -0700 Subject: [PATCH] Updated the docstrings on parsers.*Parser.parser --- rest_framework/parsers.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/rest_framework/parsers.py b/rest_framework/parsers.py index 25be2e6ab..ffc36c52a 100644 --- a/rest_framework/parsers.py +++ b/rest_framework/parsers.py @@ -50,10 +50,7 @@ class JSONParser(BaseParser): def parse(self, stream, media_type=None, parser_context=None): """ - Returns a 2-tuple of `(data, files)`. - - `data` will be an object which is the parsed content of the response. - `files` will always be `None`. + Returns a dict of parsed items. """ parser_context = parser_context or {} encoding = parser_context.get('encoding', settings.DEFAULT_CHARSET) @@ -74,10 +71,7 @@ class YAMLParser(BaseParser): def parse(self, stream, media_type=None, parser_context=None): """ - Returns a 2-tuple of `(data, files)`. - - `data` will be an object which is the parsed content of the response. - `files` will always be `None`. + Returns a dict of parsed items. """ assert yaml, 'YAMLParser requires pyyaml to be installed' @@ -100,10 +94,7 @@ class FormParser(BaseParser): def parse(self, stream, media_type=None, parser_context=None): """ - Returns a 2-tuple of `(data, files)`. - - `data` will be a :class:`QueryDict` containing all the form parameters. - `files` will always be :const:`None`. + Returns a dict of parsed items. """ parser_context = parser_context or {} encoding = parser_context.get('encoding', settings.DEFAULT_CHARSET) @@ -147,6 +138,9 @@ class XMLParser(BaseParser): media_type = 'application/xml' def parse(self, stream, media_type=None, parser_context=None): + """ + Returns a dict of parsed items. + """ assert etree, 'XMLParser requires defusedxml to be installed' parser_context = parser_context or {}