Remove explicit inherits from object

This commit is contained in:
flan 2017-11-04 02:38:17 +01:00
parent 95eadafb9b
commit 3d6a2a639a
6 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -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):

View File

@ -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."""

View File

@ -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=''):

View File

@ -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.

View File

@ -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