From 7dbb6c46fb052ed7c40ceb48311b83c8ed7a91f3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alejandro=20G=C3=B3mez?= Date: Thu, 5 Jul 2012 21:23:21 +0200 Subject: [PATCH] Explicit imports and removal of unused variables --- tests.py | 6 +++--- tweepy/api.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests.py b/tests.py index 3905c6b..0c93fd6 100644 --- a/tests.py +++ b/tests.py @@ -3,7 +3,8 @@ import random from time import sleep import os -from tweepy import * +from tweepy import (API, BasicAuthHandler, OAuthHandler, Friendship, Cursor, + MemoryCache, FileCache) """Configurations""" # Must supply twitter account credentials for tests @@ -55,7 +56,7 @@ class TweepyAPITests(unittest.TestCase): self.api.retweets(123) def testgetstatus(self): - s = self.api.get_status(id=123) + self.api.get_status(id=123) def testupdateanddestroystatus(self): # test update @@ -388,4 +389,3 @@ class TweepyCacheTests(unittest.TestCase): if __name__ == '__main__': unittest.main() - diff --git a/tweepy/api.py b/tweepy/api.py index c6bd5d0..ca834d1 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -7,7 +7,7 @@ import mimetypes from tweepy.binder import bind_api from tweepy.error import TweepError -from tweepy.parsers import ModelParser, RawParser +from tweepy.parsers import ModelParser from tweepy.utils import list_to_csv @@ -727,7 +727,7 @@ class API(object): try: if os.path.getsize(filename) > (max_size * 1024): raise TweepError('File is too big, must be less than 700kb.') - except os.error, e: + except os.error: raise TweepError('Unable to access file') # image must be gif, jpeg, or png -- 2.25.1