Validation issue with optional source location.
| 52 | |
| 53 | @dataclass |
| 54 | class ValidationIssue: |
| 55 | """Validation issue with optional source location.""" |
| 56 | |
| 57 | message: str |
| 58 | location: Optional[SourceLocation] |
| 59 | severity: str |
| 60 | |
| 61 | def __str__(self) -> str: |
| 62 | if not self.location: |
| 63 | return self.message |
| 64 | return f"{self.location.file}:{self.location.line}:{self.location.column}: {self.message}" |
| 65 | |
| 66 | |
| 67 | class SchemaValidator: |