Run all lint stages. Returns: True if all stages passed, False otherwise
(self)
| 38 | self.stage_metadata: dict[str, dict[str, str]] = {} |
| 39 | |
| 40 | def run(self) -> bool: |
| 41 | """ |
| 42 | Run all lint stages. |
| 43 | |
| 44 | Returns: |
| 45 | True if all stages passed, False otherwise |
| 46 | """ |
| 47 | if not self.stages: |
| 48 | return True |
| 49 | |
| 50 | # Create temp directory for output capture |
| 51 | self.tmpdir = Path(tempfile.mkdtemp(prefix="fastled_lint_")) |
| 52 | |
| 53 | try: |
| 54 | if self.parallel and len(self.stages) > 1: |
| 55 | return self._run_parallel() |
| 56 | else: |
| 57 | return self._run_inline() |
| 58 | finally: |
| 59 | # Cleanup temp directory |
| 60 | if self.tmpdir and self.tmpdir.exists(): |
| 61 | import shutil |
| 62 | |
| 63 | shutil.rmtree(self.tmpdir, ignore_errors=True) |
| 64 | |
| 65 | def _run_parallel(self) -> bool: |
| 66 | """Run stages in parallel with ThreadPoolExecutor.""" |