MCPcopy Create free account
hub / github.com/numpy/numpy / check_lint

Function check_lint

runtests.py:694–710  ·  view source on GitHub ↗

Adds ROOT_DIR to path and performs lint checks. This functions exits the program with status code of lint check.

(lint_args)

Source from the content-addressed store, hash-verified

692 print("HTML output generated under build/lcov/")
693
694def check_lint(lint_args):
695 """
696 Adds ROOT_DIR to path and performs lint checks.
697 This functions exits the program with status code of lint check.
698 """
699 sys.path.append(ROOT_DIR)
700 try:
701 from tools.linter import DiffLinter
702 except ModuleNotFoundError as e:
703 print(f"Error: {e.msg}. "
704 "Install using linter_requirements.txt.")
705 sys.exit(1)
706
707 uncommitted = lint_args == "uncommitted"
708 branch = "main" if uncommitted else lint_args
709
710 DiffLinter(branch).run_lint(uncommitted)
711
712
713if __name__ == "__main__":

Callers 1

mainFunction · 0.85

Calls 3

DiffLinterClass · 0.90
printFunction · 0.85
run_lintMethod · 0.80

Tested by

no test coverage detected