Commit 7dbb6c46 authored by Alejandro Gómez's avatar Alejandro Gómez
Browse files

Explicit imports and removal of unused variables

parent 8e5adbea
......@@ -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()
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment