SILENT KILLERPanel

Current Path: > > opt > imunify360 > > venv > lib > python3.11 > site-packages > jinja2


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/imunify360//venv/lib/python3.11/site-packages/jinja2

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
__init__.py File 1549 bytes July 04 2025 13:31:02.
_compat.py File 3191 bytes July 04 2025 13:31:02.
_identifier.py File 1775 bytes July 04 2025 13:31:02.
asyncfilters.py File 4250 bytes July 04 2025 13:31:02.
asyncsupport.py File 7209 bytes July 04 2025 13:31:02.
bccache.py File 12139 bytes July 04 2025 13:31:02.
compiler.py File 66284 bytes July 04 2025 13:31:02.
constants.py File 1458 bytes July 04 2025 13:31:02.
debug.py File 8529 bytes July 04 2025 13:31:02.
defaults.py File 1126 bytes July 04 2025 13:31:02.
environment.py File 50629 bytes July 04 2025 13:31:02.
exceptions.py File 5425 bytes July 04 2025 13:31:02.
ext.py File 26441 bytes July 04 2025 13:31:02.
filters.py File 41415 bytes July 04 2025 13:31:02.
idtracking.py File 9211 bytes July 04 2025 13:31:02.
lexer.py File 30331 bytes July 04 2025 13:31:02.
loaders.py File 17666 bytes July 04 2025 13:31:02.
meta.py File 4131 bytes July 04 2025 13:31:02.
nativetypes.py File 2753 bytes July 04 2025 13:31:02.
nodes.py File 31095 bytes July 04 2025 13:31:02.
optimizer.py File 1457 bytes July 04 2025 13:31:02.
parser.py File 35660 bytes July 04 2025 13:31:02.
runtime.py File 30618 bytes July 04 2025 13:31:02.
sandbox.py File 17127 bytes July 04 2025 13:31:02.
tests.py File 4799 bytes July 04 2025 13:31:02.
utils.py File 22522 bytes July 04 2025 13:31:02.
visitor.py File 3240 bytes July 04 2025 13:31:02.

Reading File: //opt/imunify360//venv/lib/python3.11/site-packages/jinja2/optimizer.py

# -*- coding: utf-8 -*-
"""The optimizer tries to constant fold expressions and modify the AST
in place so that it should be faster to evaluate.

Because the AST does not contain all the scoping information and the
compiler has to find that out, we cannot do all the optimizations we
want. For example, loop unrolling doesn't work because unrolled loops
would have a different scope. The solution would be a second syntax tree
that stored the scoping rules.
"""
from . import nodes
from .visitor import NodeTransformer


def optimize(node, environment):
    """The context hint can be used to perform an static optimization
    based on the context given."""
    optimizer = Optimizer(environment)
    return optimizer.visit(node)


class Optimizer(NodeTransformer):
    def __init__(self, environment):
        self.environment = environment

    def generic_visit(self, node, *args, **kwargs):
        node = super(Optimizer, self).generic_visit(node, *args, **kwargs)

        # Do constant folding. Some other nodes besides Expr have
        # as_const, but folding them causes errors later on.
        if isinstance(node, nodes.Expr):
            try:
                return nodes.Const.from_untrusted(
                    node.as_const(args[0] if args else None),
                    lineno=node.lineno,
                    environment=self.environment,
                )
            except nodes.Impossible:
                pass

        return node

SILENT KILLER Tool