for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import logging
from plumbum import local, CommandNotFound
plumbum
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
from changes import shell
log = logging.getLogger(__name__)
log
(([A-Z_][A-Z0-9_]*)|(__.*__))$
This check looks for invalid names for a range of different identifiers.
You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.
If your project includes a Pylint configuration file, the settings contained in that file take precedence.
To find out more about Pylint, please refer to their site.
def get_test_runner():
test_runners = ['tox', 'nosetests', 'py.test']
test_runner = None
for runner in test_runners:
try:
test_runner = local[runner]
except CommandNotFound:
continue
return test_runner
def run_tests():
"""Executes your tests."""
test_runner = get_test_runner()
if test_runner:
result = test_runner()
log.info('Test execution returned:\n%s' % result)
return result
else:
log.info('No test runner found')
return None
def run_test_command(context):
if context.test_command:
result = shell.dry_run(context.test_command, context.dry_run)
log.info('Test command "%s", returned %s', context.test_command, result)
This check looks for lines that are too long. You can specify the maximum line length.
return True
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.
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.