cheesecake_kwalitee_index/kwalitee/evaluator.py
def lint(dest, name):
    """
    Run Pylint and get the overall score of a package.
    """
    package = os.path.join(dest, name)
    logger.info('Lint checking %s', name)

    cmd = 'pylint {}'.format(package)
    proc = subprocess.Popen(cmd,
                            stdout=subprocess.PIPE,
                            stderr=subprocess.PIPE,
                            shell=True)
    proc.wait()

    for line in proc.stdout.read().decode().splitlines():
        if line.startswith('Your code has been rated at'):
            score = re.search(r'(-?\d+(?:\.\d+)?)/10', line)
            break
    else:
        # It couldn't find our score so there must have been an error
        logger.error('Error while lint checking %s', package)
        logger.error('Stdout = \n%s', proc.stdout.read().strip())
        logger.error('Stderr = \n%s', proc.stderr.read().strip())
        raise RuntimeError('Linter failed with error code: {}'.format(
            proc.returncode))

    return float(score.group(1))

    Run Pylint and get the overall score of a package.
    
Run Pylint and get the overall score of a package.
Run Pylint and get the overall score of a package .
def lint(dest, name):
    package = os.path.join(dest, name)
    logger.info('Lint checking %s', name)
    cmd = 'pylint {}'.format(package)
    proc = subprocess.Popen(cmd,
                            stdout=subprocess.PIPE,
                            stderr=subprocess.PIPE,
                            shell=True)
    proc.wait()
    for line in proc.stdout.read().decode().splitlines():
        if line.startswith('Your code has been rated at'):
            score = re.search(r'(-?\d+(?:\.\d+)?)/10', line)
            break
    else:
        logger.error('Error while lint checking %s', package)
        logger.error('Stdout = \n%s', proc.stdout.read().strip())
        logger.error('Stderr = \n%s', proc.stderr.read().strip())
        raise RuntimeError('Linter failed with error code: {}'.format(
            proc.returncode))
    return float(score.group(1))
def lint ( dest , name ) : package = os . path . join ( dest , name ) logger . info ( 'Lint checking %s' , name ) cmd = 'pylint {}' . format ( package ) proc = subprocess . Popen ( cmd , stdout = subprocess . PIPE , stderr = subprocess . PIPE , shell = True ) proc . wait ( ) for line in proc . stdout . read ( ) . decode ( ) . splitlines ( ) : if line . startswith ( 'Your code has been rated at' ) : score = re . search ( r'(-?\d+(?:\.\d+)?)/10' , line ) break else : logger . error ( 'Error while lint checking %s' , package ) logger . error ( 'Stdout = \n%s' , proc . stdout . read ( ) . strip ( ) ) logger . error ( 'Stderr = \n%s' , proc . stderr . read ( ) . strip ( ) ) raise RuntimeError ( 'Linter failed with error code: {}' . format ( proc . returncode ) ) return float ( score . group ( 1 ) )
Run Pylint and get the overall score of a package.
Run Pylint and get the overall score of a package .
"""
    Run Pylint and get the overall score of a package.
    """ # It couldn't find our score so there must have been an error
dest
name