INNER CODE UNIT · Python

flake8_main

yezyilomo/django-restql · runtests.py:14

def flake8_main(args):
    print("Running flake8 code linting")
    ret = subprocess.call(["flake8"] + args)
    msg = (
        WARNING_COLOR + "flake8 failed\n" + END_COLOR
        if ret else "flake8 passed\n"
    )
    print(msg)
    return ret


def runtests():
    ret = flake8_main(FLAKE8_ARGS)
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.settings")
    argv = sys.argv[:1] + ["test"] + sys.argv[1:]
    execute_from_command_line(argv)
    sys.exit(ret)  # Fail build if code linting fails

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…