Skip to content

SourceLocation

Use source_id to find the snapshot in result.sources, then use the one-based line and optional zero-based column to locate the measured source.

dataclass linescope.model.SourceLocation[source]

Locate a one-based line and zero-based character column in a snapshot.

Attributes

source_id : str

Identifier of the snapshot containing this location.

line : int

One-based source line number.

column : int | None

Zero-based character offset, or None when unavailable.

symbol : str | None

Resolved symbol label, or None when unavailable.


See Also

LineStats

Aggregate a visible source line without inventing unsupported hit counts.

SourceUnit

Preserve the full source text observed during collection.

SymbolRef

Link one source token, rather than an entire line, to a definition.