{ } Raw JSON

bundles / papyri 0.0.10 / papyri / tokens / parse_script

function

papyri.tokens:parse_script

source: /papyri/tokens.py :68

Signature

def   parse_script ( script : str ns : dict[str, Any] prev : str config : Config * where : str | None = None )  →  list[tuple[str, str | None]] | None

Summary

Parse a script into tokens and use Jedi to infer the fully qualified names of each token.

Parameters

script : str

the script to tokenize and infer types on

ns : dict

Extra namespace to use with jedi's Interpreter. This will be used for implicit imports, for example that np is interpreted as numpy.

prev : str

previous lines that lead to this.

where : <Insert Type here>

<Multiline Description Here>

config : <Insert Type here>

<Multiline Description Here>

Returns

: List of tuples with:
: text:

text of the token

reference : str

fully qualified name of the type of current token

Aliases

  • papyri.gen.parse_script