for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
from plugin.core.database.wrapper.base import APSWBaseWrapper
base
plugin.core.database.wrapper
This can be caused by one of the following:
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
# .scrutinizer.yml before_commands: - sudo pip install abc # Python2 - sudo pip3 install abc # Python3
This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.
__init__.py
import apsw
apsw
import logging
import sys
log = logging.getLogger(__name__)
class APSWConnectionWrapper(apsw.Connection, APSWBaseWrapper):
__init__
def cursor(self, *args, **kwargs):
cursor = super(APSWConnectionWrapper, self).cursor(*args, **kwargs)
# Return wrapped cursor
return APSWCursorWrapper(self, cursor)
class APSWCursorWrapper(object):
def __init__(self, connection, cursor):
self.__connection = connection
self.__cursor = cursor
def execute(self, *args, **kwargs):
try:
return self.__cursor.execute(*args, **kwargs)
except self.__connection.critical_errors:
self.__connection.on_exception(sys.exc_info())
def __getattr__(self, key):
if key.startswith('_APSWCursorWrapper__'):
return getattr(self, key)
return getattr(self.__cursor, key)