Remove subclassing of object
authorHarmon <Harmon758@gmail.com>
Sat, 26 Dec 2020 08:14:56 +0000 (02:14 -0600)
committerHarmon <Harmon758@gmail.com>
Sat, 26 Dec 2020 08:14:56 +0000 (02:14 -0600)
tests/test_resultset.py
tweepy/api.py
tweepy/auth.py
tweepy/binder.py
tweepy/cache.py
tweepy/cursor.py
tweepy/models.py
tweepy/parsers.py
tweepy/streaming.py

index b9141eeaa33889de9e402abab8771eba6249348a..861f3a59dcb0de68203eb378e0e2166fc3efd081 100644 (file)
@@ -2,9 +2,9 @@ from .config import TweepyTestCase
 
 from tweepy.models import ResultSet
 
-class NoIdItem(object): pass
+class NoIdItem: pass
 
-class IdItem(object):
+class IdItem:
     def __init__(self, id):
         self.id = id
 
index 72411b06f2415ccdb8bb666e2d20b4a077837fe7..0a4ccd02a1c0f3e1e1341bb79bff15cd94525849 100644 (file)
@@ -12,7 +12,7 @@ from tweepy.parsers import ModelParser, Parser
 from tweepy.utils import list_to_csv
 
 
-class API(object):
+class API:
     """Twitter API"""
 
     def __init__(self, auth_handler=None,
index 271c77cff3e36fae6c9b96c1c4430e27b4ba8660..7e82b407480a88f2a41bf740fc6b698537d11065 100644 (file)
@@ -19,7 +19,7 @@ https://dev.twitter.com/discussions/21281"""
 log = logging.getLogger(__name__)
 
 
-class AuthHandler(object):
+class AuthHandler:
 
     def apply_auth(self, url, method, headers, parameters):
         """Apply authentication headers to request"""
index b323aed3c7aedb9500706e9f00be16be5d871206..08974257508a02822a38785b4cfc299d7cb9eceb 100644 (file)
@@ -22,7 +22,7 @@ log = logging.getLogger(__name__)
 
 def bind_api(**config):
 
-    class APIMethod(object):
+    class APIMethod:
 
         api = config['api']
         path = config['path']
index ab0135ac6a8bf63fecaac239ae2d0ccd0edc9a3a..f24a10102eec059dbed6cd84e3c939b7cf7a378e 100644 (file)
@@ -24,7 +24,7 @@ except ImportError:
 log = logging.getLogger(__name__)
 
 
-class Cache(object):
+class Cache:
     """Cache interface"""
 
     def __init__(self, timeout=60):
index a488d376447e9f26eafc023b380b395b3e04a032..85eabce664eba8a56583b326ac147762e214661e 100644 (file)
@@ -6,7 +6,7 @@ from tweepy.error import TweepError
 from tweepy.parsers import ModelParser, RawParser
 
 
-class Cursor(object):
+class Cursor:
     """Pagination helper class"""
 
     def __init__(self, method, *args, **kwargs):
@@ -39,7 +39,7 @@ class Cursor(object):
         return i
 
 
-class BaseIterator(object):
+class BaseIterator:
 
     def __init__(self, method, *args, **kwargs):
         self.method = method
index 2d0239d242401ee1fcf9016f973dae5126335e8e..a734acb794f77d3ff967f350fc0acbb0c012b6e7 100644 (file)
@@ -32,7 +32,7 @@ class ResultSet(list):
         return [item.id for item in self if hasattr(item, 'id')]
 
 
-class Model(object):
+class Model:
 
     def __init__(self, api=None):
         self._api = api
@@ -503,7 +503,7 @@ class Media(Model):
         return media
 
 
-class ModelFactory(object):
+class ModelFactory:
     """
     Used by parsers for creating instances
     of models. You may subclass this factory
index a526efb72e8be495c7d24e895d056e4bdd93b2f2..cd2fb8b115ca30329ad32d8dfefa2925cbe0465b 100644 (file)
@@ -8,7 +8,7 @@ from tweepy.error import TweepError
 from tweepy.models import ModelFactory
 
 
-class Parser(object):
+class Parser:
 
     def parse(self, method, payload, *args, **kwargs):
         """
index 3bb54aa03e5fe44d6dd4a7e3fbf0cb1e6631f0ff..d77cdaa16ebb6624b4a58bb673cbd42aa5e41de5 100644 (file)
@@ -25,7 +25,7 @@ STREAM_VERSION = '1.1'
 log = logging.getLogger(__name__)
 
 
-class StreamListener(object):
+class StreamListener:
 
     def __init__(self, api=None):
         self.api = api or API()
@@ -154,7 +154,7 @@ class StreamListener(object):
         """Called when a user withheld content notice arrives"""
         return
 
-class ReadBuffer(object):
+class ReadBuffer:
     """Buffer data from the response in a smarter way than httplib/requests can.
 
     Tweets are roughly in the 2-12kb range, averaging around 3kb.
@@ -204,7 +204,7 @@ class ReadBuffer(object):
         return r.decode(self._encoding)
 
 
-class Stream(object):
+class Stream:
 
     def __init__(self, auth, listener, **options):
         self.auth = auth