MCPcopy
hub / github.com/pallets/jinja / describe_token_expr

Function describe_token_expr

src/jinja2/lexer.py:193–203  ·  view source on GitHub ↗

Like `describe_token` but for token expressions.

(expr: str)

Source from the content-addressed store, hash-verified

191
192
193def describe_token_expr(expr: str) -> str:
194 """Like `describe_token` but for token expressions."""
195 if ":" in expr:
196 type, value = expr.split(":", 1)
197
198 if type == TOKEN_NAME:
199 return value
200 else:
201 type = expr
202
203 return _describe_token_type(type)
204
205
206def count_newlines(value: str) -> int:

Callers 1

expectMethod · 0.85

Calls 1

_describe_token_typeFunction · 0.85

Tested by

no test coverage detected