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

Method skip_if

src/jinja2/lexer.py:376–378  ·  view source on GitHub ↗

Like :meth:`next_if` but only returns `True` or `False`.

(self, expr: str)

Source from the content-addressed store, hash-verified

374 return None
375
376 def skip_if(self, expr: str) -> bool:
377 """Like :meth:`next_if` but only returns `True` or `False`."""
378 return self.next_if(expr) is not None
379
380 def __next__(self) -> Token:
381 """Go one token ahead and return the old one.

Callers 12

parseMethod · 0.80
parse_statementsMethod · 0.80
parse_setMethod · 0.80
parse_forMethod · 0.80
parse_blockMethod · 0.80
parse_fromMethod · 0.80
parse_signatureMethod · 0.80
parse_condexprMethod · 0.80
parse_orMethod · 0.80
parse_andMethod · 0.80
parse_compareMethod · 0.80
parseMethod · 0.80

Calls 1

next_ifMethod · 0.95

Tested by

no test coverage detected