MCPcopy Index your code
hub / github.com/bpython/bpython / token_is_any_of

Function token_is_any_of

bpython/repl.py:1297–1305  ·  view source on GitHub ↗

Return a callable object that returns whether a token is any of the given types `token_types`.

(token_types)

Source from the content-addressed store, hash-verified

1295
1296
1297def token_is_any_of(token_types):
1298 """Return a callable object that returns whether a token is any of the
1299 given types `token_types`."""
1300 is_token_types = tuple(map(token_is, token_types))
1301
1302 def token_is_any_of(token):
1303 return any(check(token) for check in is_token_types)
1304
1305 return token_is_any_of
1306
1307
1308def extract_exit_value(args: tuple[Any, ...]) -> Any:

Callers 1

current_stringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected