(self, fix: bool)
| 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""" |
no test coverage detected