for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
from plugin.core.environment import Environment
environment
plugin.core
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 logging
log = logging.getLogger(__name__)
class SessionPrefix(object):
@classmethod
def get(cls):
prefix = cls._get()
# Initial
if prefix is None:
return cls.increment()
return prefix
def increment(cls):
prefix = Environment.dict['session.prefix']
prefix = 1
else:
prefix += 1
# Update session prefix
cls._set(prefix)
log.debug('Incremented session prefix to %r', prefix)
def _get(cls):
return Environment.dict['session.prefix']
def _set(cls, prefix):
Environment.dict['session.prefix'] = prefix