Test Failed
Push — develop ( a80574...5ed66c )
by Dean
02:36
created

APSWDatabaseWrapper   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
dl 0
loc 6
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A _execute_sql() 0 5 2
1
from plugin.core.database.wrapper.base import APSWBaseWrapper
0 ignored issues
show
Bug introduced by
The name base does not seem to exist in module plugin.core.database.wrapper.
Loading history...
Configuration introduced by
Unable to import 'plugin.core.database.wrapper.base' (invalid syntax (<string>, line 36))

This can be caused by one of the following:

1. Missing Dependencies

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
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use the command for the correct version.

2. Missing __init__.py files

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.

Loading history...
2
3
from playhouse import apsw_ext
4
import logging
5
import sys
6
7
log = logging.getLogger(__name__)
8
9
10
class APSWDatabaseWrapper(apsw_ext.APSWDatabase, APSWBaseWrapper):
0 ignored issues
show
Bug introduced by
The method sequence_exists which was declared abstract in the super-class Database
was not overridden.

Methods which raise NotImplementedError should be overridden in concrete child classes.

Loading history...
11
    def _execute_sql(self, *args, **kwargs):
12
        try:
13
            return super(APSWDatabaseWrapper, self)._execute_sql(*args, **kwargs)
14
        except self.critical_errors:
0 ignored issues
show
Bug introduced by
The Instance of APSWDatabaseWrapper does not seem to have a member named critical_errors.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
15
            self.on_exception(sys.exc_info())
0 ignored issues
show
Bug introduced by
The Instance of APSWDatabaseWrapper does not seem to have a member named on_exception.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
16