arxjit.diagnostics

arxjit.diagnostics

Source: packages/arxjit/src/arxjit/diagnostics.py

title: Structured diagnostic records for arxjit.
summary: >-
  Define the frozen Diagnostic record and the DiagnosticSeverity enum that
  arxjit uses to report problems found while extracting, validating, or
  compiling a decorated Python function. Diagnostics point at the user's Python
  source (the file and line of the decorated function), so messages stay
  actionable without exposing compiler internals.

Classes

DiagnosticSeverity(Enum)

title: Severity level of a diagnostic.

Diagnostic

title: One structured diagnostic reported by arxjit.
attributes:
  severity:
    type: DiagnosticSeverity
    description: The severity level of the diagnostic.
  message:
    type: str
    description: The human-readable diagnostic message.
  filename:
    type: str
    description: >-
      The file defining the decorated function, or "<unknown>" when the
      source cannot be attributed.
  line:
    type: int | None
    description: One-based source line in ``filename``, when known.
  column:
    type: int | None
    description: >-
      One-based Unicode character column in ``line``, when known. Python
      AST ``col_offset`` values (zero-based UTF-8 byte offsets) must be
      converted to this representation at the boundary that produces the
      diagnostic, never stored raw.
  code:
    type: str | None
    description: Stable diagnostic code, e.g. "AJ001", when assigned.