/usr/lib/python3/dist-packages/jinja2/__pycache__
NameSizeModeActions
async_utils.cpython-310.pyc24590644editdlrm
bccache.cpython-310.pyc133090644editdlrm
compiler.cpython-310.pyc546100644editdlrm
constants.cpython-310.pyc15060644editdlrm
debug.cpython-310.pyc54150644editdlrm
defaults.cpython-310.pyc13060644editdlrm
environment.cpython-310.pyc531070644editdlrm
exceptions.cpython-310.pyc55050644editdlrm
ext.cpython-310.pyc264060644editdlrm
filters.cpython-310.pyc512820644editdlrm
idtracking.cpython-310.pyc110810644editdlrm
lexer.cpython-310.pyc205240644editdlrm
loaders.cpython-310.pyc204230644editdlrm
meta.cpython-310.pyc37860644editdlrm
nativetypes.cpython-310.pyc48650644editdlrm
nodes.cpython-310.pyc403460644editdlrm
optimizer.cpython-310.pyc19260644editdlrm
parser.cpython-310.pyc276610644editdlrm
runtime.cpython-310.pyc330800644editdlrm
sandbox.cpython-310.pyc122600644editdlrm
tests.cpython-310.pyc66600644editdlrm
utils.cpython-310.pyc274080644editdlrm
visitor.cpython-310.pyc39160644editdlrm
_identifier.cpython-310.pyc18620644editdlrm
__init__.cpython-310.pyc18750644editdlrm
Edit: /usr/lib/python3/dist-packages/jinja2/__pycache__/visitor.cpython-310.pyc (3916B)
o :` @sZdZddlZddlmZejrddlZGdddejZ GdddZ Gd d d e Z dS) zVAPI for traversing the AST nodes. Implemented by the compiler and meta introspection. N)Nodec@s,eZdZdedejdejdejfddZdS) VisitCallablenodeargskwargsreturncOsdSNselfrrrr r 0/usr/lib/python3/dist-packages/jinja2/visitor.py__call__ szVisitCallable.__call__N)__name__ __module__ __qualname__rtAnyrr r r r r s$rc@sbeZdZdZdeddfddZdedejdejdejfd d Zdedejdejdejfd d Z d S) NodeVisitoraWalks the abstract syntax tree and call visitor functions for every node found. The visitor functions may return values which will be forwarded by the `visit` method. Per default the visitor functions for the nodes are ``'visit_'`` + class name of the node. So a `TryFinally` node visit function would be `visit_TryFinally`. This behavior can be changed by overriding the `get_visitor` function. If no visitor function exists for a node (return value `None`) the `generic_visit` visitor is used instead. rrzt.Optional[VisitCallable]cCst|dt|jdS)zReturn the visitor function for this node or `None` if no visitor exists for this node. In that case the generic visit function is used instead. visit_N)getattrtyper)r rr r r get_visitorszNodeVisitor.get_visitorrrcOs@||}|dur||g|Ri|S|j|g|Ri|S)z Visit a node.N)r generic_visit)r rrrfr r r visit#s zNodeVisitor.visitcOs*|D]}|j|g|Ri|qdS)z9Called if no explicit visitor function exists for a node.N)iter_child_nodesrr r r r r,s zNodeVisitor.generic_visitN) rrr__doc__rrrrrrr r r r rs  $ rc @sReZdZdZdedejdejdefddZdedejdejdejefdd Z d S) NodeTransformeraWalks the abstract syntax tree and allows modifications of nodes. The `NodeTransformer` will walk the AST and use the return value of the visitor functions to replace or remove the old node. If the return value of the visitor function is `None` the node will be removed from the previous location otherwise it's replaced with the return value. The return value may be the original node in which case no replacement takes place. rrrrc Os|D]^\}}t|trAg}|D](}t|tr4|j|g|Ri|}|dur)qt|ts4||q||q||dd<qt|trb|j|g|Ri|}|dur\t||qt|||q|Sr ) iter_fields isinstancelistrrextendappenddelattrsetattr) r rrrfield old_value new_valuesvaluenew_noder r r r=s(        zNodeTransformer.generic_visitcOs,|j|g|Ri|}t|ts|gS|S)z{As transformers may return lists in some places this method can be used to enforce a list as return value. )rr r!)r rrrrvr r r visit_listSs zNodeTransformer.visit_listN) rrrrrrrrListr,r r r r r2s (r) rtypingrnodesr TYPE_CHECKINGtyping_extensionsteProtocolrrrr r r r s "