diff --git a/ankisyncd/collection.py b/ankisyncd/collection.py index b8cd0c2..c361cac 100644 --- a/ankisyncd/collection.py +++ b/ankisyncd/collection.py @@ -3,7 +3,7 @@ import anki.storage import os, errno -class CollectionWrapper(object): +class CollectionWrapper: """A simple wrapper around an anki.storage.Collection object. This allows us to manage and refer to the collection, whether it's open or not. It @@ -84,7 +84,7 @@ class CollectionWrapper(object): """Returns True if the collection is open, False otherwise.""" return self.__col is not None -class CollectionManager(object): +class CollectionManager: """Manages a set of CollectionWrapper objects.""" collection_wrapper = CollectionWrapper diff --git a/ankisyncd/sync_app.py b/ankisyncd/sync_app.py index d54abd0..a24f138 100644 --- a/ankisyncd/sync_app.py +++ b/ankisyncd/sync_app.py @@ -276,7 +276,7 @@ class SyncMediaHandler(anki.sync.MediaSyncer): return {'data': result, 'err':''} -class SyncUserSession(object): +class SyncUserSession: def __init__(self, name, path, collection_manager, setup_new_collection=None): import time self.skey = self._generate_session_key() @@ -319,7 +319,7 @@ class SyncUserSession(object): handler.col = col return handler -class SimpleSessionManager(object): +class SimpleSessionManager: """A simple session manager that keeps the sessions in memory.""" def __init__(self): @@ -339,7 +339,7 @@ class SimpleSessionManager(object): def delete(self, hkey): del self.sessions[hkey] -class SyncApp(object): +class SyncApp: valid_urls = SyncCollectionHandler.operations + SyncMediaHandler.operations + ['hostKey', 'upload', 'download'] def __init__(self, config): diff --git a/ankisyncd/thread.py b/ankisyncd/thread.py index 9d2dcfd..ebb0fa5 100644 --- a/ankisyncd/thread.py +++ b/ankisyncd/thread.py @@ -5,7 +5,7 @@ from queue import Queue import time, logging -class ThreadingCollectionWrapper(object): +class ThreadingCollectionWrapper: """Provides the same interface as CollectionWrapper, but it creates a new Thread to interact with the collection.""" diff --git a/ankisyncd/users.py b/ankisyncd/users.py index 1f7cce7..5eebc77 100644 --- a/ankisyncd/users.py +++ b/ankisyncd/users.py @@ -6,7 +6,7 @@ import os import sqlite3 as sqlite -class SimpleUserManager(object): +class SimpleUserManager: """A simple user manager that always allows any user.""" def __init__(self, collection_path=''): diff --git a/tests/helpers/collection_utils.py b/tests/helpers/collection_utils.py index 168883d..10fcaf5 100644 --- a/tests/helpers/collection_utils.py +++ b/tests/helpers/collection_utils.py @@ -6,7 +6,7 @@ import tempfile from anki import Collection -class CollectionUtils(object): +class CollectionUtils: """ Provides utility methods for creating, inspecting and manipulating anki collections. diff --git a/tests/helpers/mock_servers.py b/tests/helpers/mock_servers.py index f35361a..d008186 100644 --- a/tests/helpers/mock_servers.py +++ b/tests/helpers/mock_servers.py @@ -4,7 +4,7 @@ import logging from anki.sync import HttpSyncer, RemoteServer, RemoteMediaServer -class MockServerConnection(object): +class MockServerConnection: """ Mock for HttpSyncer's con attribute, a httplib2 connection. All requests that would normally got to the remote server will be redirected to our