From d3fe07f2b5f8eb6e864dafe0f242cf0dcfbe2638 Mon Sep 17 00:00:00 2001 From: florentx Date: Wed, 18 Aug 2010 17:38:42 +0200 Subject: [PATCH] Do not use self from a static method :-). --- gistapi/gistapi.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gistapi/gistapi.py b/gistapi/gistapi.py index 0b9e4b8..35baf5a 100644 --- a/gistapi/gistapi.py +++ b/gistapi/gistapi.py @@ -196,19 +196,19 @@ class Gists(object): """Gist API wrapper""" def __init__(self, username=None, token=None): - # Token-based Authentication is unnecesary, gist api still in alpha + # Token-based Authentication is unnecessary, gist api still in alpha self._username = username self._token = token @staticmethod def fetch_by_user(name): """Return a list of public Gist objects owned by - the given GitHub username""" + the given GitHub username.""" _url = GIST_JSON % 'gists/%s' % name # Return a list of Gist objects - return [Gist(json=g, username=self._username, token=self._token) + return [Gist(json=g) for g in json.load(urllib2.urlopen(_url))['gists']]