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

Method run_check_c_api

tools/linter.py:68–84  ·  view source on GitHub ↗

Run C-API borrowed-ref checker

(self)

Source from the content-addressed store, hash-verified

66 sys.exit(retcode)
67
68 def run_check_c_api(self) -> tuple[int, str]:
69 """Run C-API borrowed-ref checker"""
70 print("Running C API borrow-reference linter...")
71 borrowed_ref_script = os.path.join(
72 self.repository_root, "tools", "ci", "check_c_api_usage.py"
73 )
74 borrowed_res = subprocess.run(
75 [sys.executable, borrowed_ref_script],
76 cwd=self.repository_root,
77 stdout=subprocess.PIPE,
78 stderr=subprocess.STDOUT,
79 text=True,
80 check=False,
81 )
82
83 # Exit with non-zero if C API Check fails
84 return borrowed_res.returncode, borrowed_res.stdout
85
86
87if __name__ == "__main__":

Callers 1

run_lintMethod · 0.95

Calls 2

joinMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected