for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import contextlib
import os
import click
click
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 requests_cache
requests_cache
from . import __version__
from changes.commands import init as init_command
from changes.commands import status as status_command
VERSION = 'changes {}'.format(__version__)
@contextlib.contextmanager
def work_in(dirname=None):
"""
Context manager version of os.chdir. When exited, returns to the working
directory prior to entering.
curdir = os.getcwd()
try:
if dirname is not None:
os.chdir(dirname)
yield
finally:
os.chdir(curdir)
def print_version(context, param, value):
if not value or context.resilient_parsing:
return
click.echo(VERSION)
context.exit()
@click.option(
'--dry-run',
help='Prints (instead of executing) the operations to be performed.',
is_flag=True,
default=False,
)
'--verbose',
help='Enables verbose output.',
@click.version_option(
__version__,
'-V',
'--version',
message=VERSION
@click.group(
context_settings=dict(
help_option_names=[u'-h', u'--help']
),
def main(dry_run, verbose):
"""Ch-ch-changes"""
@click.command()
def init():
Detects, prompts and initialises the project.
init_command.init()
main.add_command(init)
@click.argument('repo_directory', required=False)
def status(repo_directory):
Shows current project release status.
repo_directory = repo_directory if repo_directory else '.'
with work_in(repo_directory):
requests_cache.configure()
status_command.status()
main.add_command(status)
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.