Represents parsed @filter block from a sketch.
| 62 | |
| 63 | @dataclass |
| 64 | class SketchFilter: |
| 65 | """Represents parsed @filter block from a sketch.""" |
| 66 | |
| 67 | require: dict[str, list[str]] = field(default_factory=lambda: {}) |
| 68 | exclude: dict[str, list[str]] = field(default_factory=lambda: {}) |
| 69 | |
| 70 | def is_empty(self) -> bool: |
| 71 | """Check if filter has any constraints.""" |
| 72 | return not self.require and not self.exclude |
| 73 | |
| 74 | |
| 75 | def _normalize_property_name(key: str) -> str: |
no outgoing calls