Get file patterns (globs) for a given operation. Args: operation: Operation name (e.g., "python_lint", "cpp_lint") Returns: List of glob patterns Raises: KeyError: If operation not found in manifest
(self, operation: str)
| 47 | self.data = json.load(f) |
| 48 | |
| 49 | def get_globs(self, operation: str) -> list[str]: |
| 50 | """ |
| 51 | Get file patterns (globs) for a given operation. |
| 52 | |
| 53 | Args: |
| 54 | operation: Operation name (e.g., "python_lint", "cpp_lint") |
| 55 | |
| 56 | Returns: |
| 57 | List of glob patterns |
| 58 | |
| 59 | Raises: |
| 60 | KeyError: If operation not found in manifest |
| 61 | """ |
| 62 | if operation not in self.data["operations"]: |
| 63 | raise KeyError( |
| 64 | f"Operation '{operation}' not found in manifest. Available: " |
| 65 | f"{', '.join(self.data['operations'].keys())}" |
| 66 | ) |
| 67 | |
| 68 | return self.data["operations"][operation].get("globs", []) |
| 69 | |
| 70 | def get_excludes(self, operation: str) -> list[str]: |
| 71 | """ |