MCPcopy Index your code
hub / github.com/python/cpython / shorttok

Function shorttok

Tools/peg_generator/pegen/tokenizer.py:10–15  ·  view source on GitHub ↗
(tok: tokenize.TokenInfo)

Source from the content-addressed store, hash-verified

8
9
10def shorttok(tok: tokenize.TokenInfo) -> str:
11 formatted = (
12 f"{tok.start[0]}.{tok.start[1]}: "
13 f"{token.tok_name[tok.type]}:{tok.string!r}"
14 )
15 return f"{formatted:<25.25}"
16
17
18class Tokenizer:

Callers 1

reportMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…