From cf204f23ff180c9760144af1b2e65ef5671314f6 Mon Sep 17 00:00:00 2001 From: Michael Lazar Date: Wed, 21 Jan 2015 00:23:51 -0800 Subject: [PATCH] Fixed docstrings. --- rtv/content_generators.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rtv/content_generators.py b/rtv/content_generators.py index 7fe2056..4c74629 100644 --- a/rtv/content_generators.py +++ b/rtv/content_generators.py @@ -69,16 +69,16 @@ class SubmissionGenerator(object): class SubredditGenerator(object): """ - Grabs a subreddit from PRAW lazily and store in an internal list for repeat - access. - - params: - session (praw.Reddit): Active reddit connection - subreddit (str): Subreddit to connect to, None defaults to front page. + Grabs a subreddit from PRAW and lazily stores submissions to an internal + list for repeat access. """ def __init__(self, reddit_session, subreddit=None): - + """ + params: + session (praw.Reddit): Active reddit connection + subreddit (str): Subreddit to connect to, defaults to front page. + """ self.r = reddit_session self.r.config.decode_html_entities = True @@ -121,7 +121,7 @@ class SubredditGenerator(object): data = self._strip_praw_submission(self._submissions.next()) self._submission_data.append(data) - # Modifies the original original dict, faster than copying + # Modifies the original dict, faster than copying data = self._submission_data[index] data['split_title'] = textwrap.wrap(data['title'], width=n_cols) data['n_rows'] = len(data['split_title']) + 3