MCPcopy Index your code
hub / github.com/numpy/numpy / run_lint

Method run_lint

tools/linter.py:46–66  ·  view source on GitHub ↗
(self, fix: bool)

Source from the content-addressed store, hash-verified

44 return res.returncode, res.stdout
45
46 def run_lint(self, fix: bool) -> None:
47
48 # Ruff Linter
49 retcode, ruff_errors = self.run_ruff(fix)
50 ruff_errors and print(ruff_errors)
51
52 if retcode:
53 sys.exit(retcode)
54
55 # C API Borrowed-ref Linter
56 retcode, c_API_errors = self.run_check_c_api()
57 c_API_errors and print(c_API_errors)
58
59 if retcode:
60 sys.exit(retcode)
61
62 # Cython Linter
63 retcode, cython_errors = self.run_cython_lint()
64 cython_errors and print(cython_errors)
65
66 sys.exit(retcode)
67
68 def run_check_c_api(self) -> tuple[int, str]:
69 """Run C-API borrowed-ref checker"""

Callers 1

linter.pyFile · 0.80

Calls 3

run_ruffMethod · 0.95
run_check_c_apiMethod · 0.95
run_cython_lintMethod · 0.95

Tested by

no test coverage detected