예제 #1
0
def check_file(path, complexity=-1):
    warnings = pyflakes.checkPath(path)
    warnings += pep8style.input_file(path)
    if complexity > -1:
        warnings += mccabe.get_module_complexity(path, complexity)
    warnings += runDocTests(path)
    return warnings
예제 #2
0
def check_file(path, ignore=[], complexity=-1):
    if pep8style.excluded(path):
        return 0
    warnings = pyflakes.checkPath(path, ignore)
    warnings += pep8style.input_file(path)
    if complexity > -1:
        warnings += mccabe.get_module_complexity(path, complexity)
    return warnings
예제 #3
0
파일: run.py 프로젝트: onlytiancai/flake8
def check_file(path, ignore=[], complexity=-1):
    if pep8style.excluded(path):
        return 0
    warnings = pyflakes.checkPath(path, ignore)
    warnings += pep8style.input_file(path)
    if complexity > -1:
        warnings += mccabe.get_module_complexity(path, complexity)
    return warnings
예제 #4
0
파일: main.py 프로젝트: gfreezy/flake8
def check_file(path, ignore=(), complexity=-1):
    if pep8style.excluded(path):
        return 0
    warning = flakey.check_path(path)
    _set_alt(warning)
    warnings = flakey.print_messages(warning, ignore=ignore)
    warnings += pep8style.input_file(path)
    if complexity > -1:
        warnings += mccabe.get_module_complexity(path, complexity)
    return warnings
예제 #5
0
def mccabe_check(filename):
    mccabe.get_module_complexity(filename, 10)
예제 #6
0
def check_file(path, complexity=-1):
    warnings = pyflakes.checkPath(path)
    warnings += pep8.input_file(path)
    if complexity > -1:
        warnings += mccabe.get_module_complexity(path, complexity)
    return warnings