MCPcopy Create free account
hub / github.com/astral-sh/ruff / source_map

Method source_map

crates/ruff_python_ast/src/script.rs:31–33  ·  view source on GitHub ↗

Returns the map from extracted TOML offsets to their original script offsets.

(&self)

Source from the content-addressed store, hash-verified

29
30 /// Returns the map from extracted TOML offsets to their original script offsets.
31 pub fn source_map(&self) -> &ScriptSourceMap {
32 &self.source_map
33 }
34
35 /// Given the contents of a Python file, extract the `script` metadata block with leading
36 /// comment hashes removed and map its offsets to the original Python script.

Callers 2

script_metadataFunction · 0.80
script_metadata_tokensFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected