MCPcopy Index your code
hub / github.com/ipython/ipython / generate_tokens

Function generate_tokens

IPython/utils/tokenutil.py:24–30  ·  view source on GitHub ↗

wrap generate_tkens to catch EOF errors

(readline: Callable)

Source from the content-addressed store, hash-verified

22
23
24def generate_tokens(readline: Callable) -> Generator[TokenInfo, None, None]:
25 """wrap generate_tkens to catch EOF errors"""
26 try:
27 yield from tokenize.generate_tokens(readline)
28 except tokenize.TokenError:
29 # catch EOF error
30 return
31
32
33def generate_tokens_catch_errors(

Callers 3

accept_tokenFunction · 0.90
token_at_cursorFunction · 0.85
format2Method · 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…