Skip to content

SourceUnit

Access complete captured source through result.sources. Snapshot identifiers connect source text to measurements and navigation links.

dataclass linescope.model.SourceUnit[source]

Preserve the full source text observed during collection.

Attributes

id : str

Stable identifier used by measurements and navigation links.

path : str

Original file path or notebook cell label shown in the report.

source : str

Complete source text frozen when the snapshot is captured.

kind : str | SourceKind

Source category normalized to SourceKind at construction.


See Also

ProfileResult

Combine portable source snapshots with backend-independent run data.

SourceLocation

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

SymbolDefinition

Identify a statically resolved project definition.