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

Method get_corresponding_lineno

src/jinja2/environment.py:1482–1489  ·  view source on GitHub ↗

Return the source line number of a line number in the generated bytecode as they are not in sync.

(self, lineno: int)

Source from the content-addressed store, hash-verified

1480 return self._get_default_module()
1481
1482 def get_corresponding_lineno(self, lineno: int) -> int:
1483 """Return the source line number of a line number in the
1484 generated bytecode as they are not in sync.
1485 """
1486 for template_line, code_line in reversed(self.debug_info):
1487 if code_line <= lineno:
1488 return template_line
1489 return 1
1490
1491 @property
1492 def is_up_to_date(self) -> bool:

Calls

no outgoing calls