From df4044c922fe294318a803aeb77c79c7f250a986 Mon Sep 17 00:00:00 2001 From: Santosh Kumar Date: Thu, 14 Feb 2013 14:46:44 +0530 Subject: [PATCH] Change Tabs to Spaces --- examples/streaming.py | 28 ++++++++++++++-------------- tweepy/api.py | 2 +- tweepy/auth.py | 6 +++--- tweepy/models.py | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/examples/streaming.py b/examples/streaming.py index ece230c..41e200a 100644 --- a/examples/streaming.py +++ b/examples/streaming.py @@ -2,7 +2,7 @@ from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream -# Go to http://dev.twitter.com and create an app. +# Go to http://dev.twitter.com and create an app. # The consumer key and secret will be generated for you after consumer_key="" consumer_secret="" @@ -13,21 +13,21 @@ access_token="" access_token_secret="" class StdOutListener(StreamListener): - """ A listener handles tweets are the received from the stream. - This is a basic listener that just prints received tweets to stdout. + """ A listener handles tweets are the received from the stream. + This is a basic listener that just prints received tweets to stdout. - """ - def on_data(self, data): - print data - return True + """ + def on_data(self, data): + print data + return True - def on_error(self, status): - print status + def on_error(self, status): + print status if __name__ == '__main__': - l = StdOutListener() - auth = OAuthHandler(consumer_key, consumer_secret) - auth.set_access_token(access_token, access_token_secret) + l = StdOutListener() + auth = OAuthHandler(consumer_key, consumer_secret) + auth.set_access_token(access_token, access_token_secret) - stream = Stream(auth, l) - stream.filter(track=['basketball']) + stream = Stream(auth, l) + stream.filter(track=['basketball']) diff --git a/tweepy/api.py b/tweepy/api.py index 273e059..5beb0ce 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -267,7 +267,7 @@ class API(object): """ Perform bulk look up of friendships from user ID or screenname """ def lookup_friendships(self, user_ids=None, screen_names=None): - return self._lookup_friendships(list_to_csv(user_ids), list_to_csv(screen_names)) + return self._lookup_friendships(list_to_csv(user_ids), list_to_csv(screen_names)) _lookup_friendships = bind_api( path = '/friendships/lookup.json', diff --git a/tweepy/auth.py b/tweepy/auth.py index b770ebb..27890aa 100644 --- a/tweepy/auth.py +++ b/tweepy/auth.py @@ -138,9 +138,9 @@ class OAuthHandler(AuthHandler): oauth_consumer=self._consumer, http_method='POST', http_url=url, parameters = { - 'x_auth_mode': 'client_auth', - 'x_auth_username': username, - 'x_auth_password': password + 'x_auth_mode': 'client_auth', + 'x_auth_username': username, + 'x_auth_password': password } ) request.sign_request(self._sigmethod, self._consumer, None) diff --git a/tweepy/models.py b/tweepy/models.py index fe87adb..8257e51 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -315,7 +315,7 @@ class Relationship(Model): result = cls(api) for k,v in json.items(): if k == 'connections': - setattr(result, 'is_following', 'following' in v) + setattr(result, 'is_following', 'following' in v) setattr(result, 'is_followed_by', 'followed_by' in v) else: setattr(result, k, v) -- 2.25.1